{"id":3907,"date":"2014-12-09T14:35:44","date_gmt":"2014-12-09T05:35:44","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=3907"},"modified":"2019-01-11T14:59:35","modified_gmt":"2019-01-11T05:59:35","slug":"post-3907","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/webix\/3907","title":{"rendered":"[Webix]\u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc"},"content":{"rendered":"<p><a href=\"https:\/\/shimz.me\/example\/webix\/sidemenu\/01\/\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webix141209.jpg\" alt=\"webix \u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\" width=\"590\" height=\"370\" class=\"alignnone size-full wp-image-3908\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webix141209.jpg 590w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webix141209-239x150.jpg 239w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/qiita.com\/advent-calendar\/2014\/webix\">Webix Advent Calendar 2014<\/a> \uff19\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u7ba1\u7406\u753b\u9762\u306a\u3069\u3067\u3088\u304f\u3064\u304b\u308f\u308c\u308b\u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\nWebix\u3067\u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b\u306e\u306f\u3072\u3058\u3087\u3046\u306b\u7c21\u5358\u3067<a href=\"https:\/\/gunmagisgeek.com\/blog\/webix\/3874\">List\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/a>\u3092\u5c11\u3057\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3060\u3051\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"400\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/sidemenu\/01\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/sidemenu\/01\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >\/\/\u30e1\u30cb\u30e5\u30fc\u30c7\u30fc\u30bf\nvar menuList = [\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff11\", targetView: \"mv1\"}, \/\/title:\u30e1\u30cb\u30e5\u30fc\u540d, targetView:\u5bfe\u8c61\u3068\u3059\u308bmainView\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff12\", targetView: \"mv2\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff13\", targetView: \"mv3\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff14\", targetView: \"mv4\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff15\", targetView: \"mv5\"}\n];\n\n\/\/\u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u2015\u8981\u7d20\nvar sideMenu = {\n    header:\"Menu\",  \/\/\u30ea\u30b9\u30c8\u30d3\u30e5\u30fc\u306b\u30d8\u30c3\u30c0\u3092\u4ed8\u3051\u308b\n    body:{\n        view:\"list\",\n        width:300,\n        template:\"#title#\", \n        select:\"select\",    \/\/\u30bb\u30ec\u30af\u30c8\u53ef\u306b\u8a2d\u5b9a  \n        on:{\n            onAfterSelect:function(id){ \/\/\u30ea\u30b9\u30c8\u9078\u629e\u5f8c\u306b\u767a\u706b\u3059\u308b\u30a4\u30d9\u30f3\u30c8\n                var targetView = this.getItem(id).targetView; \/\/\u9078\u629e\u3055\u308c\u305fitem\u306etagetView\u3092\u53d6\u5f97\n                $$(targetView).show();  \/\/\u5bfe\u8c61\u3068\u306a\u308bmainView\u3092\u8868\u793a\n            }\n        },\n        data:menuList,  \/\/\u30e1\u30cb\u30e5\u30fc\u30c7\u30fc\u30bf\u3092\u53cd\u6620\n    }\n};\n\n\/\/\u30e1\u30a4\u30f3\u30d3\u30e5\u30fc\u8981\u7d20\nvar meinView = {\n    \/\/animate:{type:\"flip\", subtype:\"vertical\"}, \/\/\u5207\u308a\u66ff\u3048\u6642\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u6307\u5b9a\n    cells:[\n    {id:\"mv1\", template:\"&lt;h1&gt;Main View 1&lt;\/h1&gt;\"},\n    {id:\"mv2\", template:\"&lt;h1&gt;Main View \uff12&lt;\/h1&gt;\"},\n    {id:\"mv3\", template:\"&lt;h1&gt;Main View \uff13&lt;\/h1&gt;\"},\n    {id:\"mv4\", template:\"&lt;h1&gt;Main View \uff14&lt;\/h1&gt;\"},\n    {id:\"mv5\", template:\"&lt;h1&gt;Main View \uff15&lt;\/h1&gt;\"},\n]};\n\n\n\/\/\u30ec\u30a4\u30a2\u30a6\u30c8\u6307\u5b9a\nwebix.ui({\n    rows:[\n        {template:\"header\", css: \"bkbg\", height:35 },\n        {cols:[sideMenu, meinView]} ,\n        {template:\"fotter\", css:\"bkbg\", height:35 },\n    ]\n});\n<\/pre>\n<p>\u57fa\u672c\u7684\u306b\u306f\u30ea\u30b9\u30c8\u30d3\u30e5\u30fc\u306bon\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8a2d\u5b9a\u3057\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u969b\u306btagetView\u306e\u5024\u3067\u6307\u5b9a\u3055\u308c\u305fid\u306e\u30e1\u30a4\u30f3\u30d3\u30e5\u30fc\u3092\u958b\u3044\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<br \/>\nwebix\u3067\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306bid\u3092\u6307\u5b9a\u3059\u308c\u3070\u3001$$(&#8220;id\u540d&#8221;)\u3067\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u9078\u629e\u3057\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\uff08HTML\u8981\u7d20\u306eid\u5c5e\u6027\u3068\u306f\u5225\u306e\u3082\u306e\u306a\u306e\u3067\u6ce8\u610f\uff09<br \/>\n\u4eca\u56de\u306e\u5834\u5408mainView\u3068\u3057\u3066\u4e94\u3064\u306etemplate\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092cells\u306b\u914d\u5217\u3068\u3057\u3066\u6e21\u3057\u3066\u3044\u307e\u3059\u3002cells\u306b\u6e21\u3055\u308c\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u753b\u9762\u521d\u671f\u8868\u793a\u6642\u306b\u306fcells[0]\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3060\u3051\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n$(&#8220;id\u540d&#8221;).show()\u3067cells\u306e\u4e2d\u8eab\u3092\u5165\u308c\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" title=\"\u4f8b\" >$$(\"mv3\").show(); \/\/id:mv3\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u8868\u793a\u3055\u308c\u308b<\/pre>\n<h2>\u8907\u96d1\u306a\u4f8b<\/h2>\n<p>Webix\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u30b7\u30b9\u30c6\u30e0\u3068\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8907\u96d1\u306a\u914d\u7f6e\u3082\u7c21\u5358\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"500\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/sidemenu\/02\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/sidemenu\/02\/\">example<\/a><\/p>\n<pre class=\"lang:js decode:true \" >\/** \u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\u30c7\u30fc\u30bf *************************************\/\nvar a_List = [\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff11\", targetView: \"a_mv1\"},   \n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff12\", targetView: \"a_mv2\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff13\", targetView: \"a_mv3\"}\n];\n\nvar b_List = [\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff11\", targetView: \"b_mv1\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff12\", targetView: \"b_mv2\"},\n    {title:\"\u30e1\u30cb\u30e5\u30fc\uff13\", targetView: \"b_mv3\"}\n];\n\n\n\/** \u30e1\u30a4\u30f3\u30d3\u30e5\u30fc *************************************\/\nvar a_view = {\n    animate:{type:\"flip\", subtype:\"vertical\"}, \/\/\u5207\u308a\u66ff\u3048\u6642\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u6307\u5b9a\n    cells:[\n    {id:\"a_mv1\", template:\"<h1>A Main View 1<\/h1>\"},\n    {id:\"a_mv2\", template:\"<h1>A Main View \uff12<\/h1>\"},\n    {id:\"a_mv3\", template:\"<h1>A Main View \uff13<\/h1>\"}\n]};\n\nvar b_view = {\n    animate:{type:\"flip\", subtype:\"horizontal\"}, \/\/\u5207\u308a\u66ff\u3048\u6642\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u6307\u5b9a\n    cells:[\n    {id:\"b_mv1\", template:\"<h1>B Main View 1<\/h1>\"},\n    {id:\"b_mv2\", template:\"<h1>B Main View \uff12<\/h1>\"},\n    {id:\"b_mv3\", template:\"<h1>B Main View \uff13<\/h1>\"}\n]};\n\n\n\/** \u30b5\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\u30d3\u30e5\u30fc *************************************\/\nvar sideMenu = {\n    body:{\n        view:\"list\",\n        template:\"#title#\",\n        autoheight:true,\n        select:\"select\",    \/\/\u30bb\u30ec\u30af\u30c8\u53ef\u306b\u8a2d\u5b9a  \n        on:{\n            onAfterSelect:function(id){ \/\/\u30ea\u30b9\u30c8\u9078\u629e\u5f8c\u306b\u767a\u706b\u3059\u308b\u30a4\u30d9\u30f3\u30c8\n                var targetView = this.getItem(id).targetView; \/\/\u9078\u629e\u3055\u308c\u305fitem\u306etagetView\u3092\u53d6\u5f97\n                $$(targetView).show();  \/\/\u5bfe\u8c61\u3068\u306a\u308bmainView\u3092\u8868\u793a\n            }\n        }\n    },\n};\n\n\/\/\u30e1\u30cb\u30e5\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30b3\u30d4\u30fc\nvar a_sideMenu = webix.copy(sideMenu);\nvar b_sideMenu = webix.copy(sideMenu);\n\na_sideMenu.header = \"A MENU\";   \/\/\u30e1\u30cb\u30e5\u30fc\u30d8\u30c3\u30c0\u30fc\u8a2d\u5b9a\na_sideMenu.body.data = a_List;  \/\/\u30e1\u30cb\u30e5\u30fc\u30c7\u30fc\u30bf\u3092\u9069\u7528\nb_sideMenu.header = \"B MENU\";\nb_sideMenu.body.data = b_List;\n\n\n\n\/** \u30ec\u30a4\u30a2\u30a6\u30c8\u6307\u5b9a *************************************\/\nwebix.ui({\n    rows:[\n        {template:\"header\", css: \"bkbg\", height:35 },\n        {\n            type:\"space\",\n            cols:[\n               {rows:[a_sideMenu, a_view]},\n               {rows:[b_view, b_sideMenu]},\n            ]\n        },\n        {template:\"fotter\", css:\"bkbg\", height:35 },\n    ]\n});\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Webix Advent Calendar 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3908,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-3907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webix","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=3907"}],"version-history":[{"count":0,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/3908"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=3907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=3907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=3907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}