How to use the panel.js function in panel

To help you get started, we’ve selected a few panel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bh-lay / blog / frontEnd / admin / gallery / index.js View on Github external
this_select.open(name);
		}).on('click','a[data-action="createDir"]',function(){
			//创建新的文件夹
			UI.ask('新目录叫什么呢?', function(txt){
				this_select.createDir(txt);
			});
		}).on('click','a[data-action="back"]',function(){
			//后退
			this_select.back();
		}).on('click','a[data-action="changeLayout"]',function(){
			//改变布局
			this_select.layout();
		});

		//空白处绑定右键
		var fileMenu = panel({
			targets: '.gP_cnt'
		});
		fileMenu.add('mkdir',{txt:'新建目录'},function(){
			//创建新的文件夹
			UI.ask('新目录叫什么呢?', function(txt){
				this_select.createDir(txt);
			});
		});
		
		
		//文件右键菜单
		var fileMenu = panel({
			targets: '.gP_item[data-type="file"]'
		});
		//指定类型
		fileMenu.type = 'menu';
github bh-lay / blog / frontEnd / admin / gallery / index.js View on Github external
});

		//空白处绑定右键
		var fileMenu = panel({
			targets: '.gP_cnt'
		});
		fileMenu.add('mkdir',{txt:'新建目录'},function(){
			//创建新的文件夹
			UI.ask('新目录叫什么呢?', function(txt){
				this_select.createDir(txt);
			});
		});
		
		
		//文件右键菜单
		var fileMenu = panel({
			targets: '.gP_item[data-type="file"]'
		});
		//指定类型
		fileMenu.type = 'menu';
		//增删菜单条目
		fileMenu.add('rename',{txt:'重命名'},function(){
			//重命名
			var fullname = $(this).attr('data-fullname');
			var file = this_select.get(fullname,'file');
			file && file.rename();
		});
		fileMenu.add('delete',{txt:'删除'},function(){
			//删除
			var fullname = $(this).attr('data-fullname');
			var file = this_select.get(fullname,'file');
			file && file.del();
github bh-lay / blog / frontEnd / admin / gallery / index.js View on Github external
var fullname = $(this).attr('data-fullname');
			var file = this_select.get(fullname,'file');
			file && file.del();
		});
		fileMenu.add('showurl',{txt:'url地址'},function(){
			//显示绝对地址
			var fullname = $(this).attr('data-fullname');
			var file = this_select.get(fullname,'file');
			UI.confirm({
				text: '<a href="' + file.url + '">' + file.url + '</a>'
			})
		});
		
		
		//文件夹右键菜单
		var folderMenu = panel({
			targets: '.gP_item[data-type="folder"]'
		});
		//指定类型
		folderMenu.type = 'menu';
		//增删菜单条目
		folderMenu.add('open',{
      txt: '打开'
    },function(){
			//重命名
			var fullname = $(this).attr('data-fullname');
			this_select.open(fullname);
		});
		folderMenu.add('rename',{
      txt: '重命名'
    },function(){
			//重命名