diff --git a/css/legacy/body.css b/css/legacy/body.css index dbc9ba801a..4cef202433 100644 --- a/css/legacy/body.css +++ b/css/legacy/body.css @@ -25,7 +25,7 @@ select, input, textarea { border: 1px solid #ccc; -moz-border-radius: 4px; -webkit-border-radius: 4px; - font-size: 13px; + font-size: inherit; padding: 4px; color: #444; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); @@ -37,7 +37,7 @@ textarea { font-family: inherit; height: 120px; width: 90%; - font-size: 12px; + font-size: inherit; white-space: normal; } @@ -100,6 +100,15 @@ div.fix_ff_cursor { overflow: auto; } div.comment { color: #444; } +.small { + font-size: 11px; +} + +.help { + margin: 3px 0px; + color: #888; +} + div#body_div { position: relative; display: none; @@ -181,7 +190,6 @@ div.loading_div { display: none; text-align: center; padding: 2px; - font-size: 12px; border: 1px solid #FF4; } diff --git a/css/legacy/calendar.css b/css/legacy/calendar.css index 1637889cfd..aa3b7a18cf 100644 --- a/css/legacy/calendar.css +++ b/css/legacy/calendar.css @@ -152,7 +152,6 @@ div.cal_event { width: 100%; height: 12px; overflow: hidden; - font-size: 11px; color: #00B; margin-bottom: 2px; text-decoration: underline; diff --git a/css/legacy/forms.css b/css/legacy/forms.css index d130b9b94d..aa2f3c62b7 100644 --- a/css/legacy/forms.css +++ b/css/legacy/forms.css @@ -46,24 +46,6 @@ div.grid_tbarlinks { } -div.frm_tip_box { - margin: 0px; - padding: 8px; - background-color: #FFC; - display: none; - font-size: 11px; - border: 1px solid #FFB; -} - -div.frm_tip_box table { - border-collapse: collapse; - vertical-align: top; -} - -td.frm_tray_area { - width: 122px; -} - div.dialog_frm { position: relative; margin: 10px; @@ -160,12 +142,6 @@ div.time_field select{ .datainputcell { padding: 2px 0px; } -.field_description, .help { - margin: 3px 0px; - font-size: 11px; - color: #888; -} - .help ol { padding-left: 19px; } @@ -174,9 +150,6 @@ div.time_field select{ margin-bottom: 3px; } -.field_label { - font-size:11px; -} .input_area input, select, textarea { font-size: 14px; padding: 2px; @@ -227,7 +200,6 @@ div.sidebar-comment-wrapper input { } div.sidebar-comment-message { margin-top: 8px; - font-size: 11px; color: #777; } @@ -238,6 +210,5 @@ div.sidebar-comment-text { color: #444; } div.sidebar-comment-info { - font-size: 10px; color: #777; } \ No newline at end of file diff --git a/css/legacy/sidebar.css b/css/legacy/sidebar.css index 82ae9c2ccc..257d543525 100644 --- a/css/legacy/sidebar.css +++ b/css/legacy/sidebar.css @@ -15,7 +15,7 @@ div.psidebar div.section { div.psidebar div.section-head { padding: 5px 11px; - border-bottom: 2px solid #777; + border-bottom: 1px solid #aaa; } div.psidebar div.section-body { @@ -27,6 +27,5 @@ div.psidebar div.section-item { } div.psidebar div.section-item, div.psidebar .section-link { - font-size: 11px; color: #666; } \ No newline at end of file diff --git a/css/ui/fonts.css b/css/ui/fonts.css index a56a215d96..cf6fd6a996 100644 --- a/css/ui/fonts.css +++ b/css/ui/fonts.css @@ -1,7 +1,7 @@ @font-face { font-family: 'Pontano Sans'; font-style: normal; - font-weight: 400; + font-weight: 800; src: url('../lib/css/fonts/pontanosans.woff') format('woff'); } diff --git a/js/core.min.js b/js/core.min.js index 793a91e84e..aee8818c39 100644 --- a/js/core.min.js +++ b/js/core.min.js @@ -228,11 +228,11 @@ wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doct ',{label:this.label}));},setup:function(){var me=this;me.can_delete=wn.model.can_delete(me.doctype);me.meta=locals.DocType[me.doctype];me.$page.find('.wnlist-area').empty(),me.setup_docstatus_filter();me.setup_listview();me.init_list();me.init_stats();me.add_delete_option();},setup_docstatus_filter:function(){var me=this;this.can_submit=$.map(locals.DocPerm,function(d){if(d.parent==me.meta.name&&d.submit)return 1 else return null;}).length;if(this.can_submit){this.$page.find('.show-docstatus').removeClass('hide');this.$page.find('.show-docstatus input').click(function(){me.run();})}},setup_listview:function(){if(this.meta.__listjs){eval(this.meta.__listjs);this.listview=new wn.doclistviews[this.doctype](this);}else{this.listview=new wn.views.ListView(this);} this.listview.parent=this;},init_list:function(){this.make({method:'webnotes.widgets.doclistview.get',get_args:this.get_args,parent:this.$page.find('.wnlist-area'),start:0,page_length:20,show_filters:true,show_grid:true,new_doctype:this.doctype,allow_delete:true,columns:this.listview.fields});this.run();},render_row:function(row,data){data.doctype=this.doctype;this.listview.render(row,data,this);},get_query_fields:function(){return this.listview.fields;},get_args:function(){return{doctype:this.doctype,fields:this.get_query_fields(),filters:this.filter_list.get_filters(),docstatus:this.can_submit?$.map(this.$page.find('.show-docstatus :checked'),function(inp){return $(inp).attr('data-docstatus')}):[]}},add_delete_option:function(){var me=this;if(this.can_delete){this.add_button('\ - Delete',function(){me.delete_items();},'.btn-filter')}},delete_items:function(){var me=this;var dl=$.map(me.$page.find('.list-check :checked'),function(e){return $(e).data('name');});if(!dl.length) + Delete',function(){me.delete_items();},'.btn-filter')}},delete_items:function(){var me=this;var dl=$.map(me.$page.find('.list-delete:checked'),function(e){return $(e).data('name');});if(!dl.length) return;if(!confirm('This is PERMANENT action and you cannot undo. Continue?')){return;} me.set_working(true);wn.call({method:'webnotes.widgets.doclistview.delete_items',args:{items:dl,doctype:me.doctype},callback:function(){me.set_working(false);me.refresh();}})},init_stats:function(){var me=this wn.call({method:'webnotes.widgets.doclistview.get_stats',args:{stats:me.listview.stats,doctype:me.doctype},callback:function(r){$.each(r.message,function(field,stat){me.render_stat(field,stat);});}});},render_stat:function(field,stat){var me=this;if(!stat||!stat.length){if(field=='_user_tags'){this.$page.find('.layout-side-section').append('

Tags

\ -
No records tagged.

\ +
No records tagged.

\ To add a tag, open the document and click on \ "Add Tag" on the sidebar
');} return;} @@ -255,12 +255,18 @@ if(typeof opts.content=='function'){opts.content(parent,data);} else if(opts.content=='name'){$(parent).html(repl('%(name)s',data));} else if(opts.content=='avatar'){$(parent).html(repl('',data));} -else if(opts.content=='check'){$(parent).html('');$(parent).find('input').data('name',data.name);} +else if(opts.content=='check'){$(parent).html('');$(parent).find('input').data('name',data.name);} else if(opts.content=='docstatus'){$(parent).html(repl('',data));} else if(opts.content=='tags'){this.add_user_tags(parent,data);} else if(opts.content=='modified'){$(parent).append(data.when);} -else if(data[opts.content]){$(parent).append(data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('',v);});var tr=$(row).html(''+rowhtml+'
').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('' +else if(opts.type=='bar-graph'){args={percent:data[opts.content],fully_delivered:(data[opts.content]>99?'bar-complete':''),label:opts.label} +$(parent).html(repl('\ + \ + ',args));} +else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('',v);});var tr=$(row).html(''+rowhtml+'
').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){$.each(data._user_tags.split(','),function(i,t){if(t){$('' +strip(t)+'').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}}) /* * lib/js/wn/views/pageview.js diff --git a/js/legacy/widgets/form/fields.js b/js/legacy/widgets/form/fields.js index aec5e45abd..cf9d998ed4 100644 --- a/js/legacy/widgets/form/fields.js +++ b/js/legacy/widgets/form/fields.js @@ -56,7 +56,7 @@ Field.prototype.make_body = function() { // label if(this.with_label) { - this.label_span = $a(this.label_area, 'span', 'field_label') + this.label_span = $a(this.label_area, 'span', 'small') // error icon this.label_icon = $a(this.label_area,'img','',{margin:'-3px 4px -3px 4px'}); $dh(this.label_icon); @@ -115,11 +115,11 @@ Field.prototype.set_description = function() { if(this.df.description) { // parent var p = in_list(['Text Editor', 'Code', 'Check'], this.df.fieldtype) ? this.label_area : this.wrapper; - this.desc_area = $a(p, 'div', 'help', '', this.df.description) + this.desc_area = $a(p, 'div', 'help small', '', this.df.description) // padding on the bottom if(in_list(['Text Editor', 'Code'], this.df.fieldtype)) - $(this.desc_area).addClass('field_description_top'); + $(this.desc_area).addClass('help small'); } } @@ -936,7 +936,7 @@ function make_text_dialog() { this.widgets['Enter Text'].focus(); this.widgets['Description'].innerHTML = '' if(this.field.df.description) - $a(this.widgets['Description'], 'div', 'field_description', '', this.field.df.description); + $a(this.widgets['Description'], 'div', 'help small', '', this.field.df.description); } d.onhide = function() { if(_f.cur_grid_cell) diff --git a/js/legacy/widgets/form/form_fields.js b/js/legacy/widgets/form/form_fields.js index d54c808efb..20e2d00cfd 100644 --- a/js/legacy/widgets/form/form_fields.js +++ b/js/legacy/widgets/form/form_fields.js @@ -84,7 +84,7 @@ _f.SectionBreak.prototype.make_body = function() { this.df.description = ''; $(this.row.main_head).html(repl('
\
%(label)s\ -
%(description)s
\ +
%(description)s
\
', this.df)); this.$expand = $(this.row.main_head).find('.head').click(function() { @@ -246,7 +246,7 @@ _f.TableField.prototype.make_body = function() { if(this.perm[this.df.permlevel] && this.perm[this.df.permlevel][READ]) { // add comment area if(this.df.description) { - this.desc_area = $a(this.parent, 'div', 'field_description', '', this.df.description) + this.desc_area = $a(this.parent, 'div', 'help small', '', this.df.description) } this.grid = new _f.FormGrid(this); if(this.frm)this.frm.grids[this.frm.grids.length] = this; diff --git a/js/legacy/wn/widgets/form/attachments.js b/js/legacy/wn/widgets/form/attachments.js index fdd6f371a8..3ad1bed6bd 100644 --- a/js/legacy/wn/widgets/form/attachments.js +++ b/js/legacy/wn/widgets/form/attachments.js @@ -115,7 +115,7 @@ wn.widgets.form.sidebar.Attachment = function(parent, filedet, frm) { var display_name = this.fileid; if(this.fileid.substr(0,8)=='FileData') display_name = this.filename; - this.ln = $a(this.wrapper, 'a', 'link_type', {fontSize:'11px'}, display_name); + this.ln = $a(this.wrapper, 'a', 'link_type small', {}, display_name); this.ln.href = 'files/'+this.fileid; this.ln.target = '_blank'; diff --git a/js/legacy/wn/widgets/form/comments.js b/js/legacy/wn/widgets/form/comments.js index 4cbde0de16..80b12b3323 100644 --- a/js/legacy/wn/widgets/form/comments.js +++ b/js/legacy/wn/widgets/form/comments.js @@ -45,12 +45,13 @@ wn.widgets.form.sidebar.Comments = function(parent, sidebar, doctype, docname) { this.render_comments = function() { var f = wn.widgets.form.comments; var cl = f.comment_list[me.docname] - this.msg = $a(this.wrapper, 'div', 'sidebar-comment-message'); + this.msg = $a(this.wrapper, 'div', 'help small'); if(cl) { this.msg.innerHTML = cl.length + ' out of ' + f.n_comments[me.docname] + ' comments'; if(f.n_comments[me.docname] > cl.length) { - this.msg.innerHTML += ' Show all' + this.msg.innerHTML += ' Show all' } for(var i=0; i< cl.length; i++) { this.render_one_comment(cl[i]); diff --git a/js/legacy/wn/widgets/form/sidebar.js b/js/legacy/wn/widgets/form/sidebar.js index efe80a733f..c918207c15 100644 --- a/js/legacy/wn/widgets/form/sidebar.js +++ b/js/legacy/wn/widgets/form/sidebar.js @@ -147,10 +147,10 @@ wn.widgets.form.sidebar = { Sidebar: function(form) { $(wrapper).html(repl('

Created:
\ \ - %(creation)s

\ + %(creation)s

\

Modified:
\ \ - %(modified)s

', { + %(modified)s

', { created_by: wn.user_info(doc.owner).fullname, avatar_created: wn.user_info(doc.owner).image, creation: scrub_date(doc.creation), @@ -170,7 +170,7 @@ wn.widgets.form.sidebar = { Sidebar: function(form) { wn.md2html = new Showdown.converter(); } - $a(wrapper, 'div', 'help', {}, + $a(wrapper, 'div', 'help small', {}, wn.md2html.makeHtml(me.form.meta.description)); }, display: function() { return me.form.meta.description } diff --git a/js/legacy/wn/widgets/page_sidebar.js b/js/legacy/wn/widgets/page_sidebar.js index c40fde40b2..762dc00d37 100644 --- a/js/legacy/wn/widgets/page_sidebar.js +++ b/js/legacy/wn/widgets/page_sidebar.js @@ -82,7 +82,7 @@ wn.widgets.PageSidebarSection = function(sidebar, opts) { var item = this.opts.items[i]; if((item.display && item.display()) || !item.display) { - var div = $a(this.body, 'div', 'section-item'); + var div = $a(this.body, 'div', 'section-item small'); this.make_one_item(item, div); } @@ -131,7 +131,7 @@ wn.widgets.PageSidebarLink = function(section, opts, wrapper) { if(opts.icon) { section.add_icon(this.wrapper, opts.icon); } - this.ln = $a(this.wrapper, 'span', 'link_type section-link', opts.style, opts.label); + this.ln = $a(this.wrapper, 'span', 'link_type section-link small', opts.style, opts.label); this.ln.onclick = function() { me.opts.onclick(me) }; } diff --git a/js/wn/views/doclistview.js b/js/wn/views/doclistview.js index ba79a09149..0da517ec1d 100644 --- a/js/wn/views/doclistview.js +++ b/js/wn/views/doclistview.js @@ -147,7 +147,7 @@ wn.views.DocListView = wn.ui.Listing.extend({ }, delete_items: function() { var me = this; - var dl = $.map(me.$page.find('.list-check :checked'), function(e) { + var dl = $.map(me.$page.find('.list-delete:checked'), function(e) { return $(e).data('name'); }); if(!dl.length) @@ -191,7 +191,7 @@ wn.views.DocListView = wn.ui.Listing.extend({ if(field=='_user_tags') { this.$page.find('.layout-side-section') .append('

Tags

\ -
No records tagged.

\ +
No records tagged.

\ To add a tag, open the document and click on \ "Add Tag" on the sidebar
'); } @@ -329,7 +329,7 @@ wn.views.ListView = Class.extend({ data)); } else if(opts.content=='check') { - $(parent).html(''); + $(parent).html(''); $(parent).find('input').data('name', data.name); } else if(opts.content=='docstatus') { @@ -342,8 +342,20 @@ wn.views.ListView = Class.extend({ else if(opts.content=='modified') { $(parent).append(data.when); } + else if(opts.type=='bar-graph') { + args = { + percent: data[opts.content], + fully_delivered: (data[opts.content] > 99 ? 'bar-complete' : ''), + label: opts.label + } + $(parent).html(repl('\ + \ + ', args)); + } else if(data[opts.content]) { - $(parent).append(data[opts.content]); + $(parent).append(' ' + data[opts.content]); } },