Example #1
0
 hideChild: function(id) {
     var me = this;
     var nid = me.id + '_menu_' + id;
     var vf = Magix.Vframe.get(nid);
     if (vf) {
         me['timer_' + id] = setTimeout(me.wrapAsync(function() {
             vf.invoke('hide');
         }), 50);
     }
 },
 show: function(view, ops) {
     var id = ops.ownerNodeId;
     id = 'tsf_' + id;
     var vf = Magix.Vframe.get(id);
     if (!vf) {
         $('body').append('<div id="' + id + '" />');
         vf = view.owner.mountVframe(id, 'app/views/demos/partials/table-settings-fields', ops);
     }
     vf.invoke('update', [ops]);
 }
 show: function(view, ops) {
     var id = ops.ownerNodeId;
     id = 'tsf_' + id;
     var vf = Magix.Vframe.get(id);
     if (!vf) {
         $('body').append('<div id="' + id + '" />');
         vf = view.owner.mountVframe(id, '@moduleId', ops);
     }
     vf.invoke('update', [ops]);
 }
Example #4
0
 show: function(view, ops) {
     var id = ops.ownerNodeId;
     id = 'cp_' + id;
     var vf = Magix.Vframe.get(id);
     if (!vf) {
         $('body').append('<div id="' + id + '" />');
         view.owner.mountVframe(id, 'coms/colorpicker/index', ops);
     } else {
         vf.invoke('show');
     }
 }
Example #5
0
 show: function(view, e) {
     var node = e.ownerNode;
     var id = node.id || (node.id = Magix.guid('ctx'));
     id = 'ctx_' + id;
     var vf = Magix.Vframe.get(id);
     if (vf) {
         vf.invoke('show', [e], true);
     } else {
         $('body').append('<div id="' + id + '" />');
         vf = view.owner.mountVframe(id, 'coms/menu/context');
         vf.invoke('update', [e], true);
         vf.invoke('show', [e], true);
     }
 }
Example #6
0
 me['stimer_' + id] = setTimeout(me.wrapAsync(function() {
     var nid = me.id + '_menu_' + id;
     var vf = Magix.Vframe.get(nid);
     if (!vf) {
         $('body').append('<div id="' + nid + '" />');
         vf = me.owner.mountVframe(nid, 'coms/menu/index');
     }
     vf.invoke('update', [{
         pNode: '#' + me.id + '_' + id,
         pId: id,
         map: me.$map,
         list: children,
         root: me.$root || me,
         width: me.data.get('width')
         }], true);
     vf.invoke('show', [null, node], true);
 }), 250);
Example #7
0
 mountMenus: function() {
     var loc = Router.parse();
     var href = loc.path.substring(0, loc.path.indexOf('/', 1));
     href += '/index';
     var me = this;
     var vf = Magix.Vframe.get('sidebar_' + this.id);
     console.log(vf);
     if (href != me.$lastHref) {
         me.$lastHref = href;
         $('.' + CSSNames['top-nav'] + ' a').removeClass(CSSNames.on);
         $('#' + this.id + ' a[href="#!' + href + '"]').addClass(CSSNames.on);
         if (vf) {
             var info = MenusMap[href];
             vf.invoke('updateMenu', [info ? info.subMenus : null, loc.path]);
         }
     } else if (vf) {
         vf.invoke('updateUrl', [loc.path]);
     }
 },