1 2 3 4 5 6 7 8 9 | link(rel='stylesheet', href='/stylesheets/style.css', type='text/css') link(href='/javascripts/jquery/jquery-ui-1.11.0/jquery-ui.css', rel='stylesheet', type='text/css') link(href='/javascripts/jtable.2.4.0/themes/metro/crimson/jtable.css', rel='stylesheet', type='text/css') link(href='/javascripts/jtable.2.4.0/themes/jqueryui/jtable_jqueryui.css', rel='stylesheet', type='text/css') script(src='/javascripts/jquery/jquery-1.11.1.js', type='text/javascript') script(src='/javascripts/jquery/jquery-ui-1.11.0/jquery-ui.js', type='text/javascript') script(src='/javascripts/jtable2.4.0/jquery.jtable.js', type='text/javascript') |
1 2 3 4 5 6 7 | | actions: { | listAction: '/itemlist', | createAction:'/new_item', | updateAction: '/update_item', | deleteAction: '/delete_item' | | }, |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | | itemname: { | title:'Item Name', | key: true, | list: true, | create:true, | edit: false | }, | itemvalue: { | title: 'Value', | width: '30%', | list: true, | display: function(data){ | data.record.rev=data.record._rev; | if (data.record.itemvisible==='true'){ | return data.record.itemvalue; | } else { | return "*********"; | } | }, | create: true | }, | itemvisible: { | title: 'Value is Visible', | width: '30%', | list: false, | create: true, | type: 'radiobutton', | options: { 'true':'Yes', 'false':'No'}, | defaultValue: 'false' | }, | itemdatemodified: { | title: 'Date Modified', | width: '30%', | list: true, | create: false, | edit: false, | display: function(data){ | var date = new Date(data.record.itemdatemodified); | return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); | } | }, |
1 | | copy(record,document); |
1 2 | | registerForKeyDownEvent(document,handleKeyDownEvent); | registerForKeyUpEvent(document,handleKeyUpEvent); |
1 2 3 4 5 6 7 8 9 10 11 | | var keyDownEventHandler = function (e) { | if (!(e.ctrlKey || e.metaKey)) { | return; | } | if (window.getSelection && window.getSelection() && window.getSelection().toString()) { | return; | } | if (document.selection && document.selection.createRange().text) { | return; | } | setTimeout(SCTextArea, 0); |
1 2 3 4 5 6 7 8 9 10 | | var keyUpEventHandler = function (e) { | var code = e.keyCode || e.which; | if (e.target.id !== TAId) { | return; | } | if (code!==67){ | return; | } | enclosure.style.display = 'none'; | }; |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |