@@ -3,9 +3,9 @@ | |||||
# These values are common in all dictionaries | # These values are common in all dictionaries | ||||
{ | { | ||||
u'creation': '2012-05-03 19:03:22', | |||||
u'creation': '2012-09-26 15:12:23', | |||||
u'docstatus': 0, | u'docstatus': 0, | ||||
u'modified': '2012-09-24 15:40:46', | |||||
u'modified': '2012-09-28 12:09:33', | |||||
u'modified_by': u'Administrator', | u'modified_by': u'Administrator', | ||||
u'owner': u'Administrator' | u'owner': u'Administrator' | ||||
}, | }, | ||||
@@ -119,6 +119,7 @@ | |||||
"lib/public/js/lib/jquery/jquery.ui.autocomplete.js:concat", | "lib/public/js/lib/jquery/jquery.ui.autocomplete.js:concat", | ||||
"lib/public/js/lib/tiny_mce_33/jquery.tinymce.js:concat", | "lib/public/js/lib/tiny_mce_33/jquery.tinymce.js:concat", | ||||
"lib/public/js/lib/bootstrap.min.js:concat", | "lib/public/js/lib/bootstrap.min.js:concat", | ||||
"lib/public/js/lib/mousetrap.min.js", | |||||
"lib/public/js/lib/sprintf.js", | "lib/public/js/lib/sprintf.js", | ||||
"public/js/core.min.js", | "public/js/core.min.js", | ||||
"lib/public/js/legacy/globals.js", | "lib/public/js/legacy/globals.js", | ||||
@@ -243,52 +243,6 @@ div.std-footer-item { | |||||
border-radius: 5px; | border-radius: 5px; | ||||
} | } | ||||
.layout_wrapper, .layout-wrapper { | |||||
-moz-box-shadow: 0px 0px 9px rgba(0,0,0,0.5); | |||||
-webkit-box-shadow: 0px 0px 9px rgba(0,0,0,0.5); | |||||
box-shadow: 0px 0px 9px rgba(0,0,0,0.5); | |||||
background-color: #fff; | |||||
padding: 15px; | |||||
-webkit-border-radius: 5px; | |||||
-moz-border-radius: 5px; | |||||
border-radius: 5px; | |||||
overflow: hidden; | |||||
} | |||||
.layout-wrapper-appframe { | |||||
padding: 0px; | |||||
} | |||||
.layout-wrapper-background { | |||||
background-color: #fafafa !important; | |||||
padding: 0px; | |||||
} | |||||
.layout-main { | |||||
padding: 15px; | |||||
background-color: #fff; | |||||
} | |||||
.layout-main-section { | |||||
width: 71%; | |||||
float: left; | |||||
padding: 15px; | |||||
background-color: #FFF; | |||||
min-height: 600px; | |||||
-moz-box-shadow: 2px 0px 1px #ddd; | |||||
-webkit-box-shadow: 2px 0px 1px #ddd; | |||||
box-shadow: 2px 0px 1px #ddd; | |||||
} | |||||
.layout-side-section { | |||||
width: 22%; | |||||
/*float: right;*/ | |||||
color: #606060; | |||||
overflow-x: hidden; | |||||
padding: 15px; | |||||
min-height: 600px; | |||||
} | |||||
/* from bootstrap */ | /* from bootstrap */ | ||||
.container { | .container { | ||||
margin-left: auto; | margin-left: auto; | ||||
@@ -10,9 +10,9 @@ div.dialog_wrapper { | |||||
-moz-box-shadow: 1px 1px 8px #444; | -moz-box-shadow: 1px 1px 8px #444; | ||||
-webkit-box-shadow: 1px 1px 8px #444; | -webkit-box-shadow: 1px 1px 8px #444; | ||||
border-radius: 5px; | |||||
/*border-radius: 5px; | |||||
-moz-border-radius: 5px; | -moz-border-radius: 5px; | ||||
-webkit-border-radius: 5px; | |||||
-webkit-border-radius: 5px;*/ | |||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
@@ -15,7 +15,7 @@ | |||||
/* list-row */ | /* list-row */ | ||||
div.list-row { | div.list-row { | ||||
border-bottom: 1px solid #ddd; | border-bottom: 1px solid #ddd; | ||||
padding: 5px 0px; | |||||
padding: 5px; | |||||
} | } | ||||
div.list-row .label { | div.list-row .label { | ||||
@@ -1,3 +1,48 @@ | |||||
.layout_wrapper, .layout-wrapper { | |||||
-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.9); | |||||
-webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.9); | |||||
box-shadow: 0px 0px 3px rgba(0,0,0,0.9); | |||||
background-color: #fff; | |||||
padding: 15px; | |||||
/* -webkit-border-radius: 5px; | |||||
-moz-border-radius: 5px; | |||||
border-radius: 5px; */ | |||||
overflow: hidden; | |||||
} | |||||
.layout-wrapper-appframe { | |||||
padding: 0px; | |||||
} | |||||
.layout-main { | |||||
padding: 15px; | |||||
background-color: #fff; | |||||
} | |||||
.layout-wrapper-background { | |||||
background-color: #f2f2f2 !important; | |||||
padding: 0px; | |||||
} | |||||
.layout-main-section { | |||||
width: 71%; | |||||
float: left; | |||||
padding: 15px; | |||||
background-color: #FFF; | |||||
min-height: 600px; | |||||
-moz-box-shadow: 1px 0px 1px #ccc; | |||||
-webkit-box-shadow: 1px 0px 1px #ccc; | |||||
box-shadow: 1px 0px 1px #ccc; | |||||
} | |||||
.layout-side-section { | |||||
width: 22%; | |||||
/*float: right;*/ | |||||
color: #606060; | |||||
overflow-x: hidden; | |||||
padding: 15px; | |||||
min-height: 600px; | |||||
} | |||||
.breadcrumb-area, .breadcrumb-area span { | .breadcrumb-area, .breadcrumb-area span { | ||||
vertical-align: middle; | vertical-align: middle; | ||||
@@ -5,22 +50,15 @@ | |||||
div.appframe-titlebar { | div.appframe-titlebar { | ||||
padding: 6px; | padding: 6px; | ||||
background: #eeeeee; /* Old browsers */ | |||||
background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */ | |||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */ | |||||
background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */ | |||||
background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */ | |||||
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */ | |||||
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */ | |||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */ | |||||
border-bottom: 1px solid #aaa; | |||||
background: #dfdfdf; /* Old browsers */ | |||||
min-height: 1.2em; | min-height: 1.2em; | ||||
border-radius: 5px 5px 0px 0px; | |||||
/*border-radius: 5px 5px 0px 0px; | |||||
-webkit-border-radius: 5px 5px 0px 0px; | -webkit-border-radius: 5px 5px 0px 0px; | ||||
-moz-border-radius: 5px 5px 0px 0px; | |||||
-moz-border-radius: 5px 5px 0px 0px;*/ | |||||
text-shadow: 0px 1px 1px #fff; | |||||
/*text-shadow: 0px 1px 1px #fff;*/ | |||||
color: #555; | color: #555; | ||||
border-bottom: 1px solid #c2c2c2; | |||||
} | } | ||||
span.appframe-title { | span.appframe-title { | ||||
@@ -30,9 +68,8 @@ span.appframe-title { | |||||
div.appframe-toolbar { | div.appframe-toolbar { | ||||
padding: 4px; | padding: 4px; | ||||
background: #eeeeee; | |||||
border-top: 1px solid #f8f8f8; | |||||
border-bottom: 1px solid #ccc; | |||||
background: #e9e9e9; | |||||
border-bottom: 1px solid #c2c2c2; | |||||
} | } | ||||
div.appframe-toolbar .label { | div.appframe-toolbar .label { | ||||
@@ -208,6 +208,8 @@ Field.prototype.refresh_display = function() { | |||||
if(this.disp_status=='Write') { // write | if(this.disp_status=='Write') { // write | ||||
if(this.make_input&&(!this.input)) { // make input if reqd | if(this.make_input&&(!this.input)) { // make input if reqd | ||||
this.make_input(); | this.make_input(); | ||||
if(this.txt || this.input) | |||||
$(this.txt || this.input).addClass("mousetrap"); | |||||
if(this.onmake_input) this.onmake_input(); | if(this.onmake_input) this.onmake_input(); | ||||
} | } | ||||
@@ -13,7 +13,7 @@ | |||||
var jscolor = { | var jscolor = { | ||||
dir : 'js/lib/jscolor/', // location of jscolor directory (leave empty to autodetect) | |||||
dir : 'lib/js/lib/jscolor/', // location of jscolor directory (leave empty to autodetect) | |||||
bindClass : 'color', // class name | bindClass : 'color', // class name | ||||
binding : true, // automatic binding via <input class="..."> | binding : true, // automatic binding via <input class="..."> | ||||
preloading : true, // use image preloading? | preloading : true, // use image preloading? | ||||
@@ -36,8 +36,8 @@ var jscolor = { | |||||
getDir : function() { | getDir : function() { | ||||
if(!jscolor.dir) { | if(!jscolor.dir) { | ||||
var detected = jscolor.detectDir(); | |||||
jscolor.dir = detected!==false ? detected : 'jscolor/'; | |||||
//var detected = jscolor.detectDir(); | |||||
jscolor.dir = "lib/js/lib/jscolor"; | |||||
} | } | ||||
return jscolor.dir; | return jscolor.dir; | ||||
}, | }, | ||||
@@ -0,0 +1,8 @@ | |||||
/* mousetrap v1.1.3 craig.is/killing/mice */ | |||||
(function(){function p(a,c,b){if(a.addEventListener)return a.addEventListener(c,b,!1);a.attachEvent("on"+c,b)}function v(a){return"keypress"==a.type?String.fromCharCode(a.which):h[a.which]?h[a.which]:w[a.which]?w[a.which]:String.fromCharCode(a.which).toLowerCase()}function q(a){var a=a||{},c=!1,b;for(b in l)a[b]?c=!0:l[b]=0;c||(n=!1)}function x(a,c,b,d,E){var g,e,f=[],i=b.type;if(!k[a])return[];"keyup"==i&&r(a)&&(c=[a]);for(g=0;g<k[a].length;++g)if(e=k[a][g],!(e.seq&&l[e.seq]!=e.level)&&i==e.action&& | |||||
("keypress"==i&&!b.metaKey&&!b.ctrlKey||c.sort().join(",")===e.modifiers.sort().join(",")))d&&e.combo==E&&k[a].splice(g,1),f.push(e);return f}function s(a,c){!1===a(c)&&(c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation(),c.returnValue=!1,c.cancelBubble=!0)}function t(a){a.which="number"==typeof a.which?a.which:a.keyCode;var c=v(a);if(c)if("keyup"==a.type&&u==c)u=!1;else{var b=a.target||a.srcElement,d=b.tagName;if(!(-1<(" "+b.className+" ").indexOf(" mousetrap ")?0:"INPUT"== | |||||
d||"SELECT"==d||"TEXTAREA"==d||b.contentEditable&&"true"==b.contentEditable)){b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");for(var b=x(c,b,a),f={},g=!1,d=0;d<b.length;++d)b[d].seq?(g=!0,f[b[d].seq]=1,s(b[d].callback,a)):!g&&!n&&s(b[d].callback,a);a.type==n&&!r(c)&&q(f)}}}function r(a){return"shift"==a||"ctrl"==a||"alt"==a||"meta"==a}function y(a,c,b){if(!b){if(!o){o={};for(var d in h)95<d&&112>d||h.hasOwnProperty(d)&&(o[h[d]]=d)}b=o[a]? | |||||
"keydown":"keypress"}"keypress"==b&&c.length&&(b="keydown");return b}function z(a,c,b,d,f){var a=a.replace(/\s+/g," "),g=a.split(" "),e,h,i=[];if(1<g.length){var j=a,m=b;l[j]=0;m||(m=y(g[0],[]));a=function(){n=m;++l[j];clearTimeout(A);A=setTimeout(q,1E3)};b=function(a){s(c,a);"keyup"!==m&&(u=v(a));setTimeout(q,10)};for(d=0;d<g.length;++d)z(g[d],d<g.length-1?a:b,m,j,d)}else{h="+"===a?["+"]:a.split("+");for(g=0;g<h.length;++g)e=h[g],B[e]&&(e=B[e]),b&&("keypress"!=b&&C[e])&&(e=C[e],i.push("shift")), | |||||
r(e)&&i.push(e);b=y(e,i,b);k[e]||(k[e]=[]);x(e,i,{type:b},!d,a);k[e][d?"unshift":"push"]({callback:c,modifiers:i,action:b,seq:d,level:f,combo:a})}}for(var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},w={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\", | |||||
221:"]",222:"'"},C={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},B={option:"alt",command:"meta","return":"enter",escape:"esc"},o,k={},j={},l={},A,u=!1,n=!1,f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;p(document,"keypress",t);p(document,"keydown",t);p(document,"keyup",t);var D={bind:function(a,c,b){for(var d=a instanceof Array?a:[a],f=0;f<d.length;++f)z(d[f],c,b);j[a+":"+b]=c;return this}, | |||||
unbind:function(a,c){j[a+":"+c]&&(delete j[a+":"+c],this.bind(a,function(){},c));return this},trigger:function(a,c){j[a+":"+c]();return this},reset:function(){k={};j={};return this}};window.Mousetrap=D;"function"==typeof define&&define.amd&&define("mousetrap",function(){return D})})(); |
@@ -287,6 +287,7 @@ wn.ui.Listing = Class.extend({ | |||||
render_list: function(values) { | render_list: function(values) { | ||||
var m = Math.min(values.length, this.page_length); | var m = Math.min(values.length, this.page_length); | ||||
this.data = values; | |||||
// render the rows | // render the rows | ||||
for(var i=0; i < m; i++) { | for(var i=0; i < m; i++) { | ||||
@@ -41,7 +41,7 @@ wn.ui.Search = Class.extend({ | |||||
} | } | ||||
}, | }, | ||||
render_row: function(parent, data) { | render_row: function(parent, data) { | ||||
$ln = $('<a style="cursor: pointer;" data-name="'+data.name+'">' | |||||
$ln = $('<a href="#" data-name="'+data.name+'">' | |||||
+ data.name +'</a>') | + data.name +'</a>') | ||||
.appendTo(parent) | .appendTo(parent) | ||||
.click(function() { | .click(function() { | ||||
@@ -51,7 +51,11 @@ wn.ui.Search = Class.extend({ | |||||
me.callback(val); | me.callback(val); | ||||
else | else | ||||
wn.set_route('Form', me.doctype, val); | wn.set_route('Form', me.doctype, val); | ||||
return false; | |||||
}); | }); | ||||
if(this.data.length==1) { | |||||
$ln.click(); | |||||
} | |||||
} | } | ||||
}); | }); | ||||
this.list.filter_list.add_filter(this.doctype, 'name', 'like'); | this.list.filter_list.add_filter(this.doctype, 'name', 'like'); | ||||
@@ -171,6 +171,10 @@ wn.views.DocListView = wn.ui.Listing.extend({ | |||||
return no_result_message; | return no_result_message; | ||||
}, | }, | ||||
render_row: function(row, data) { | render_row: function(row, data) { | ||||
$(row).css({ | |||||
"margin-left": "-15px", | |||||
"margin-right": "-15px" | |||||
}); | |||||
data.doctype = this.doctype; | data.doctype = this.doctype; | ||||
this.listview.render(row, data, this); | this.listview.render(row, data, this); | ||||
}, | }, | ||||
@@ -192,7 +196,7 @@ wn.views.DocListView = wn.ui.Listing.extend({ | |||||
var me = this; | var me = this; | ||||
if(this.can_delete) { | if(this.can_delete) { | ||||
this.add_button('Delete', function() { me.delete_items(); }, 'icon-remove'); | this.add_button('Delete', function() { me.delete_items(); }, 'icon-remove'); | ||||
$('<div style="padding: 4px"><input type="checkbox" name="select-all" />\ | |||||
$('<div style="padding: 9px; margin-left: -15px;"><input type="checkbox" name="select-all" />\ | |||||
Select all</div>').insertBefore(this.$page.find('.result-list')); | Select all</div>').insertBefore(this.$page.find('.result-list')); | ||||
this.$page.find('[name="select-all"]').click(function() { | this.$page.find('[name="select-all"]').click(function() { | ||||
me.$page.find('.list-delete').attr('checked', $(this).attr('checked') || false); | me.$page.find('.list-delete').attr('checked', $(this).attr('checked') || false); | ||||