fix in select type field

This commit is contained in:
Anand Doshi 2012-04-30 15:43:09 +05:30
parent c56a95d809
commit c56e068129
5 changed files with 4 additions and 8 deletions

View file

@ -17,7 +17,7 @@
}
.icon-white {
background-image: url("./lib/images/icons/glyphicons-halflings-white.png");
background-image: url("../lib/images/icons/glyphicons-halflings-white.png");
}
.icon-glass {

View file

@ -1004,7 +1004,7 @@ SelectField.prototype.make_input = function() {
if(this.file_attach)
this.set_attach_options();
me.options_list = me.df.options?me.df.options.split('\n'):[];
me.options_list = me.df.options?me.df.options.split('\n'):[''];
// add options
empty_select(this.input);

View file

@ -33,7 +33,6 @@ wn.Application = Class.extend({
// favicon
this.set_favicon();
// trigger app startup
$(document).trigger('startup');

View file

@ -27,9 +27,7 @@ wn.ui.toolbar.RecentDocs=Class.extend({init:function(){$('.navbar .nav:first').a
</li>');this.setup();this.bind_events();},bind_events:function(){var me=this;$(document).bind('rename',function(event,dt,old_name,new_name){me.rename_notify(dt,old_name,new_name)});},rename_notify:function(dt,old,name){this.remove(dt,old);this.add(dt,name,1);},add:function(dt,dn,on_top){if(this.istable(dt))return;this.remove(dt,dn);var html=repl('<li data-docref="%(dt)s/%(dn)s">\
<a href="#Form/%(dt)s/%(dn)s">\
%(dn)s <span style="font-size: 10px">(%(dt)s)</span>\
</a></li>',{dt:dt,dn:dn});if(on_top){$('#toolbar-recent').prepend(html);}else{$('#toolbar-recent').append(html);}},istable:function(dt){return locals.DocType[dt]&&locals.DocType[dt].istable||false;},remove:function(dt,dn){$(repl('#toolbar-recent li[data-docref="%(dt)s/%(dn)s"]',{dt:dt,dn:dn})).remove();},setup:function(){try{var rlist=JSON.parse(profile.recent);}
catch(e){return;}
var m=rlist.length;if(m>15)m=15;for(var i=0;i<m;i++){var rd=rlist[i]
</a></li>',{dt:dt,dn:dn});if(on_top){$('#toolbar-recent').prepend(html);}else{$('#toolbar-recent').append(html);}},istable:function(dt){return locals.DocType[dt]&&locals.DocType[dt].istable||false;},remove:function(dt,dn){$(repl('#toolbar-recent li[data-docref="%(dt)s/%(dn)s"]',{dt:dt,dn:dn})).remove();},setup:function(){var rlist=JSON.parse(profile.recent||"[]");var m=rlist.length;if(m>15)m=15;for(var i=0;i<m;i++){var rd=rlist[i]
if(rd[1]){var dt=rd[0];var dn=rd[1];this.add(dt,dn,0);}}}});
/*
* lib/js/wn/ui/toolbar/toolbar.js

View file

@ -65,8 +65,7 @@ wn.ui.toolbar.RecentDocs = Class.extend({
},
setup: function() {
// add menu items
try{ var rlist = JSON.parse(profile.recent); }
catch(e) { return; /*old style-do nothing*/ }
var rlist = JSON.parse(profile.recent||"[]");
var m = rlist.length;
if(m>15)m=15;