diff --git a/public/build.json b/public/build.json index f7d0f96308..0cb9831ba8 100644 --- a/public/build.json +++ b/public/build.json @@ -20,7 +20,6 @@ "lib/public/css/legacy/fields.css", "lib/public/css/legacy/dialog.css", "lib/public/css/legacy/tabs.css", - "lib/public/css/legacy/sidebar.css", "lib/public/css/ui/common.css", "lib/public/css/views/tree_grid.css", ] @@ -110,7 +109,6 @@ "lib/public/js/legacy/widgets/layout.js", "lib/public/js/legacy/widgets/export_query.js", "lib/public/js/legacy/wn/page_layout.js", - "lib/public/js/legacy/wn/widgets/page_sidebar.js", "lib/public/js/wn/ui/toolbar/selector_dialog.js", "lib/public/js/wn/ui/toolbar/new.js", @@ -124,7 +122,6 @@ "lib/public/js/legacy/widgets/form/form.js", "lib/public/js/legacy/widgets/form/print_format.js", "lib/public/js/legacy/widgets/form/clientscriptAPI.js", - "lib/public/js/legacy/wn/widgets/form/sidebar.js", "lib/public/js/wn/form/toolbar.js", "lib/public/js/wn/form/layout.js", diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css index bffe638eea..87b021ee7f 100644 --- a/public/css/bootstrap.css +++ b/public/css/bootstrap.css @@ -325,9 +325,13 @@ a:focus { } img { + vertical-align: middle; +} + +.img-responsive { + display: inline-block; height: auto; max-width: 100%; - vertical-align: middle; } .img-rounded { @@ -1482,6 +1486,11 @@ input[type="checkbox"]:focus { outline-offset: -2px; } +input[type="number"]::-webkit-outer-spin-button, +input[type="number"]::-webkit-inner-spin-button { + height: auto; +} + input:-moz-placeholder, textarea:-moz-placeholder { color: #999999; @@ -1601,6 +1610,7 @@ input[type="color"].input-small { border-radius: 3px; } +.has-warning .help-block, .has-warning .control-label { color: #c09853; } @@ -1624,6 +1634,7 @@ input[type="color"].input-small { border-color: #c09853; } +.has-error .help-block, .has-error .control-label { color: #b94a48; } @@ -1647,6 +1658,7 @@ input[type="color"].input-small { border-color: #b94a48; } +.has-success .help-block, .has-success .control-label { color: #468847; } @@ -2322,6 +2334,11 @@ input[type="button"].btn-block { border-bottom-left-radius: 4px; } +.list-group-item > .badge { + float: right; + margin-right: -15px; +} + .list-group-item-heading { margin-top: 0; margin-bottom: 5px; @@ -2361,16 +2378,6 @@ a.list-group-item.active .list-group-item-text { color: #e1edf7; } -.list-group-item > .badge, -.list-group-item > .glyphicon-chevron-right { - float: right; - margin-right: -15px; -} - -.list-group-item > .glyphicon + .badge { - margin-right: 5px; -} - .panel { padding: 15px; margin-bottom: 20px; @@ -3206,11 +3213,6 @@ button.close { padding-left: 8px; } -.btn-group > .btn-mini + .dropdown-toggle { - padding-right: 5px; - padding-left: 5px; -} - .btn-group > .btn-large + .dropdown-toggle { padding-right: 12px; padding-left: 12px; @@ -3304,6 +3306,7 @@ button.close { .pagination { display: inline-block; + padding-left: 0; margin: 20px 0; border-radius: 4px; } @@ -3395,6 +3398,7 @@ button.close { } .pager { + padding-left: 0; margin: 20px 0; text-align: center; list-style: none; @@ -3962,8 +3966,11 @@ button.close { display: block; } +.thumbnail > img, .img-thumbnail { display: inline-block; + height: auto; + max-width: 100%; } a.thumbnail:hover, @@ -3972,8 +3979,6 @@ a.thumbnail:focus { } .thumbnail > img { - display: block; - max-width: 100%; margin-right: auto; margin-left: auto; } @@ -4015,7 +4020,7 @@ a.thumbnail:focus { } .media-list { - margin-left: 0; + padding-left: 0; list-style: none; } @@ -4108,10 +4113,6 @@ a.badge:focus { top: -1px; } -.btn-mini .badge { - top: 0; -} - a.list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #428bca; @@ -4279,9 +4280,6 @@ a.list-group-item.active > .badge, .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; -} - -.accordion-toggle { cursor: pointer; } @@ -4311,7 +4309,9 @@ a.list-group-item.active > .badge, .carousel-inner > .item > img, .carousel-inner > .item > a > img { - display: block; + display: inline-block; + height: auto; + max-width: 100%; line-height: 1; } @@ -4418,24 +4418,26 @@ a.list-group-item.active > .badge, z-index: 15; width: 100px; padding-left: 0; - margin: 0 0 0 -50px; + margin-left: -50px; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; - width: 8px; - height: 8px; - margin-right: 0; - margin-left: 0; + width: 10px; + height: 10px; + margin: 1px; text-indent: -999px; cursor: pointer; border: 1px solid #fff; - border-radius: 5px; + border-radius: 10px; } .carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; background-color: #fff; } @@ -4574,14 +4576,41 @@ td.visible-sm { display: none !important; } +tr.visible-md { + display: none !important; +} + +th.visible-md, +td.visible-md { + display: none !important; +} + .visible-lg { display: none !important; } +tr.visible-lg { + display: none !important; +} + +th.visible-lg, +td.visible-lg { + display: none !important; +} + .hidden-sm { display: none !important; } +tr.hidden-sm { + display: none !important; +} + +th.hidden-sm, +td.hidden-sm { + display: none !important; +} + .hidden-md { display: block !important; } @@ -4612,6 +4641,13 @@ td.hidden-lg { .visible-sm { display: none !important; } + tr.visible-sm { + display: none !important; + } + th.visible-sm, + td.visible-sm { + display: none !important; + } .visible-md { display: block !important; } @@ -4625,6 +4661,13 @@ td.hidden-lg { .visible-lg { display: none !important; } + tr.visible-lg { + display: none !important; + } + th.visible-lg, + td.visible-lg { + display: none !important; + } .hidden-sm { display: block !important; } @@ -4638,6 +4681,13 @@ td.hidden-lg { .hidden-md { display: none !important; } + tr.hidden-md { + display: none !important; + } + th.hidden-md, + td.hidden-md { + display: none !important; + } .hidden-lg { display: block !important; } @@ -4654,9 +4704,23 @@ td.hidden-lg { .visible-sm { display: none !important; } + tr.visible-sm { + display: none !important; + } + th.visible-sm, + td.visible-sm { + display: none !important; + } .visible-md { display: none !important; } + tr.visible-md { + display: none !important; + } + th.visible-md, + td.visible-md { + display: none !important; + } .visible-lg { display: block !important; } @@ -4690,12 +4754,28 @@ td.hidden-lg { .hidden-lg { display: none !important; } + tr.hidden-lg { + display: none !important; + } + th.hidden-lg, + td.hidden-lg { + display: none !important; + } } .visible-print { display: none !important; } +tr.visible-print { + display: none !important; +} + +th.visible-print, +td.visible-print { + display: none !important; +} + @media print { .visible-print { display: block !important; @@ -4710,4 +4790,11 @@ td.hidden-lg { .hidden-print { display: none !important; } + tr.hidden-print { + display: none !important; + } + th.hidden-print, + td.hidden-print { + display: none !important; + } } diff --git a/public/css/legacy/sidebar.css b/public/css/legacy/sidebar.css deleted file mode 100644 index 4bac2c3ad2..0000000000 --- a/public/css/legacy/sidebar.css +++ /dev/null @@ -1,32 +0,0 @@ -div.psidebar { -} - -div.psidebar div.head { - font-size: 14px; - font-weight: bold; - color: #555; - margin-bottom: 12px; -} - -div.section { - margin-bottom: 15px; - overflow: hidden; -} - -div.section div.section-head { - padding: 5px 0px; - font-size: 109%; - font-weight: bold; -} - -div.section div.section-body { - -} - -div.section div.section-item { - margin-bottom: 7px; -} - -div.section div.section-item, div.section .section-link { - color: #666; -} \ No newline at end of file diff --git a/public/css/ui/common.css b/public/css/ui/common.css index 985335a6fd..d9c4d2fac9 100644 --- a/public/css/ui/common.css +++ b/public/css/ui/common.css @@ -47,21 +47,33 @@ a { /* module */ -.module-top .alert { +.alert-badge { padding-right: 15px; - margin-bottom: 10px; } -.module-top a, .module-top a:hover { +.alert-badge a, .alert-badge a:hover { color: black; font-size: 120%; font-weight: bold; } -.module-top .badge { +.alert-badge .badge { margin-top: 3px; } +.form-headline { + margin-bottom: 10px; + font-size: 130%; + text-align: right; +} + +.form-dashboard { + display: none; + border-bottom: 1px solid #eee; +} + +/* module */ + .module-item-progress { margin-bottom: 10px; height: 17px; @@ -384,4 +396,35 @@ textarea[data-fieldtype="Small Text"] { .hidden-sm-inline { display: inline; } -} \ No newline at end of file +} + +/* buttons */ +.btn-default { + color: #ffffff; + background-color: #a7a9aa; + border-color: #a7a9aa; +} + +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active { + background-color: #9a9c9d; + border-color: #8d9091; +} + +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #a7a9aa; + border-color: #a7a9aa; +} diff --git a/public/html/server.py b/public/html/server.py index 0a6b7399ae..af47bfeee6 100755 --- a/public/html/server.py +++ b/public/html/server.py @@ -41,7 +41,6 @@ import webnotes.auth def init(): webnotes.handler.get_cgi_fields() - # init request try: webnotes.http_request = webnotes.auth.HTTPRequest() diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js index d502e3c9c1..2367259365 100644 --- a/public/js/legacy/widgets/form/form.js +++ b/public/js/legacy/widgets/form/form.js @@ -339,16 +339,6 @@ _f.Frm.prototype.refresh_print_layout = function() { _p.build(this.$print_view_select.val(), print_callback, false, true, true); } - -_f.Frm.prototype.show_the_frm = function() { - // show the dialog - if(this.meta.in_dialog && !this.parent.dialog.display) { - if(!this.meta.istable) - this.parent.table_form = false; - this.parent.dialog.show(); - } -} - _f.Frm.prototype.set_print_heading = function(txt) { this.pformat[cur_frm.docname] = txt; } @@ -579,9 +569,6 @@ _f.Frm.prototype.refresh_dependency = function() { } } -// setnewdoc is called when a record is loaded for the first time -// ====================================================================================== - _f.Frm.prototype.setnewdoc = function(docname) { // moved this call to refresh function // this.check_doctype_conflict(docname); @@ -601,7 +588,7 @@ _f.Frm.prototype.setnewdoc = function(docname) { this.script_manager.trigger("onload"); this.last_view_is_edit[docname] = 1; - if(cint(this.meta.read_only_onload)) this.last_view_is_edit[docname] = 0; + //if(cint(this.meta.read_only_onload)) this.last_view_is_edit[docname] = 0; this.opendocs[docname] = true; } diff --git a/public/js/legacy/widgets/tags.js b/public/js/legacy/widgets/tags.js deleted file mode 100644 index 32379ccf1f..0000000000 --- a/public/js/legacy/widgets/tags.js +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) -// -// MIT License (MIT) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -// ================================================= -// -// Tag Globals -// -_tags = { - dialog: null, - color_map: {}, - all_tags: [], - colors: {'Default':'#add8e6'} - //color_list: ['Default'] // for sequence -} - -// -// Tag List -// -TagList = function(parent, start_list, dt, dn, static, onclick) { - this.start_list = start_list ? start_list : []; - this.tag_list = []; - this.dt = dt; - this.onclick = onclick; - this.dn = dn; - this.static; - this.parent = parent; - this.make_body(); -} - -TagList.prototype.make = function(parent) { - for(var i=0; ithis.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){n.to(t)}):r==t?this.pause().cycle():this.slide(t>r?"next":"prev",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(this.sliding)return;return this.slide("next")},t.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")},t.prototype.slide=function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();var f=e.Event("slide.bs.carousel",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("bs.carousel"),s=e.extend({},t.DEFAULTS,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("bs.carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("bs.carousel").pause().to(o).cycle(),t.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(window.jQuery),+function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){var i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show.bs.collapse"),"shown.bs.collapse"),e.support.transition&&this.$element[t](this.$element[0][n])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var t=this.dimension();this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide.bs.collapse"),"hidden"),this.$element[t](0)},t.prototype.reset=function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!=null?"addClass":"removeClass"]("collapse"),this},t.prototype.transition=function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),+function(e){"use strict";function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".dropdown-backdrop",n="[data-toggle=dropdown]",r=function(t){var n=e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".disabled, :disabled"))return;var r=s(n),o=r.hasClass("open");i();if(!o){"ontouchstart"in document.documentElement&&e('