Merge branch 'handlerupdate' into sync_handler_merge
Conflicts:
js/all-app.js
version.num
diff --git a/build.json b/build.json
index 499d594..33032d7 100644
--- a/build.json
+++ b/build.json
@@ -3,14 +3,22 @@
"lib/js/core.min.js": [
"lib/js/wn/class.js",
"lib/js/wn/provide.js",
- "lib/js/wn/xmlhttp.js",
"lib/js/wn/versions.js",
"lib/js/wn/assets.js",
"lib/js/wn/require.js",
"lib/js/wn/dom.js",
- "lib/js/wn/page.js",
+ "lib/js/wn/model.js",
+ "lib/js/wn/misc/tools.js",
"lib/js/wn/misc/user.js",
"lib/js/lib/json2.js",
+ "lib/js/wn/router.js",
+ "lib/js/wn/ui/listing.js",
+ "lib/js/wn/views/container.js",
+ "lib/js/wn/views/doclistview.js",
+ "lib/js/wn/views/pageview.js",
+ "lib/js/wn/views/formview.js",
+ "lib/js/wn/views/reportview.js",
+ "lib/js/wn/request.js",
"lib/js/core.js"
]
},
@@ -57,10 +65,12 @@
"lib/css/legacy/grid.css",
"lib/css/legacy/listing.css",
"lib/css/legacy/report.css",
- "lib/css/legacy/autosuggest.css",
"lib/css/legacy/dialog.css",
"lib/css/legacy/tabs.css",
"lib/css/legacy/sidebar.css",
+ "lib/css/Aristo/aristo.selected.css",
+ "lib/css/ui/list.css",
+ "lib/css/ui/fonts.css",
"lib/css/bootstrap/headings.css",
"lib/css/bootstrap/buttons.css",
"lib/css/bootstrap/navbar.css",
@@ -68,7 +78,8 @@
"lib/css/bootstrap/tooltip.css",
"lib/css/bootstrap/label.css",
"lib/css/bootstrap/icons.css",
- "erpnext/startup/startup.css"
+ "lib/css/bootstrap/popover.css",
+ "erpnext/startup/startup.css"
]
},
@@ -87,15 +98,13 @@
"lib/js/legacy/utils/shortcut.js",
"lib/js/legacy/widgets/form/fields.js",
"lib/js/wn/ui/dialog.js",
+ "lib/js/wn/ui/button.js",
"lib/js/legacy/widgets/dialog.js",
"lib/js/wn/ui/listing.js",
"lib/js/legacy/widgets/layout.js",
"lib/js/legacy/webpage/page_header.js",
- "lib/js/legacy/widgets/select.js",
- "lib/js/legacy/webpage/history.js",
"lib/js/legacy/webpage/search.js",
"lib/js/legacy/webpage/spinner.js",
- "lib/js/legacy/webpage/freeze_page.js",
"lib/js/legacy/webpage/error_console.js",
"lib/js/legacy/webpage/loaders.js",
"lib/js/legacy/webpage/uploader.js",
@@ -104,7 +113,6 @@
"lib/js/legacy/wn/widgets/footer.js",
"lib/js/legacy/model/local_data.js",
"lib/js/legacy/model/doclist.js",
- "lib/js/legacy/webpage/body.js",
"lib/js/legacy/app.js",
"js/app.js",
"erpnext/startup/startup.js",
@@ -115,8 +123,10 @@
{
"js/all-app.js": [
"lib/js/lib/history/history.min.js:concat",
- "lib/js/legacy/jquery/jquery-ui.min.js:concat",
- "lib/js/legacy/tiny_mce_33/jquery.tinymce.js:concat",
+ "lib/js/lib/jquery/jquery.ui.core.js:concat",
+ "lib/js/lib/jquery/jquery.ui.datepicker.js:concat",
+ "lib/js/lib/jquery/jquery.ui.autocomplete.js:concat",
+ "lib/js/lib/tiny_mce_33/jquery.tinymce.js:concat",
"lib/js/lib/bootstrap.min.js:concat",
"lib/js/lib/sprintf.js",
"lib/js/core.min.js:concat",
@@ -130,19 +140,15 @@
"lib/js/legacy/utils/printElement.js",
"lib/js/legacy/widgets/form/fields.js",
"lib/js/wn/ui/dialog.js",
+ "lib/js/wn/ui/button.js",
"lib/js/legacy/widgets/dialog.js",
- "lib/js/legacy/widgets/listing.js",
- "lib/js/wn/ui/listing.js",
"lib/js/legacy/widgets/layout.js",
"lib/js/legacy/widgets/tabbedpage.js",
"lib/js/legacy/webpage/page_header.js",
- "lib/js/legacy/widgets/select.js",
"lib/js/legacy/widgets/tags.js",
"lib/js/legacy/widgets/export_query.js",
- "lib/js/legacy/webpage/history.js",
"lib/js/legacy/webpage/search.js",
"lib/js/legacy/webpage/spinner.js",
- "lib/js/legacy/webpage/freeze_page.js",
"lib/js/legacy/webpage/error_console.js",
"lib/js/legacy/webpage/loaders.js",
"lib/js/legacy/webpage/uploader.js",
@@ -153,9 +159,8 @@
"lib/js/legacy/model/local_data.js",
"lib/js/legacy/model/doclist.js",
"lib/js/wn/ui/toolbar.min.js:concat",
- "lib/js/legacy/webpage/body.js",
"lib/js/legacy/widgets/form/fields.js",
- "lib/js/legacy/widgets/form/form_container.js",
+ "lib/js/legacy/widgets/form/form_dialog.js",
"lib/js/legacy/widgets/form/form_header.js",
"lib/js/legacy/widgets/form/form.js",
"lib/js/legacy/widgets/form/form_fields.js",
diff --git a/css/all-app.css b/css/all-app.css
index 0dea8b7..790887e 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -1,7 +1,8 @@
/*
* lib/css/legacy/body.css
- */html {
+ */
+html {
margin: 0px;
padding: 0px;
}
@@ -10,7 +11,7 @@
margin: 0px;
padding: 0px;
font-family: Arial, Helvetica, Sans;
- font-size: 12px;
+ font-size: 14px;
color: #000;
background-color: #e2e2e2;
}
@@ -25,19 +26,22 @@
}
select, input, textarea {
- border: 1px solid #AAA;
+ border: 1px solid #ccc;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
- font-size: 13px;
+ font-size: inherit;
padding: 4px;
- color: #222;
+ color: #444;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
textarea {
font-family: inherit;
height: 120px;
width: 90%;
- font-size: 12px;
+ font-size: inherit;
white-space: normal;
}
@@ -100,8 +104,16 @@
div.comment { color: #444; }
+.small {
+ font-size: 11px;
+}
+
+.help {
+ margin: 3px 0px;
+ color: #888;
+}
+
div#body_div {
- position: relative;
display: none;
padding-right: 7px;
width: 900px;
@@ -109,15 +121,40 @@
margin-top: 56px;
}
-footer {
+.content {
width: 900px;
- margin: auto;
+ margin-bottom: 30px;
+}
+
+.background-fade-in {
+ -webkit-transition: background 1s ease-in; /* property duration timing-function delay */
+ -moz-transition: background 1s ease-in;
+ -o-transition: background 1s ease-in;
+ transition: background 1s ease-in;
+}
+
+footer {
+ position: absolute;
+ bottom: 0px;
+ width: 100%;
}
header .container {
width: 900px;
margin: auto;
}
+@media (max-width: 1200px) {
+ div#body_div, header .container, .content, #opened-page-selector, footer {
+ width: 900px;
+ }
+}
+
+@media (min-width: 1200px) {
+ div#body_div, header .container, .content, #opened-page-selector, footer {
+ width: 1100px;
+ }
+}
+
div.no_script {
display: none;
}
@@ -131,7 +168,6 @@
display: none;
text-align: center;
padding: 2px;
- font-size: 12px;
border: 1px solid #FF4;
}
@@ -156,27 +192,18 @@
-moz-border-radius: 5px;
border-radius: 5px;
}
-.gradient {
- background: #ededed; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #d1d1d1 47%, #b7b7b7 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(47%,#d1d1d1), color-stop(100%,#b7b7b7)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#b7b7b7',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
-}
.layout_wrapper, .layout-wrapper {
- -moz-box-shadow: 1px 1px 8px #555;
- -webkit-box-shadow: 1px 1px 8px #555;
- box-shadow: 1px 1px 8px #555;
+ -moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+ -webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+ box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
background-color: #fff;
padding: 15px;
+ margin-bottom: 30px;
}
.layout-wrapper-background {
- background-color: #f2f2f2 !important;
+ background-color: #fafafa !important;
padding: 0px;
}
@@ -185,7 +212,7 @@
float: left;
padding: 15px;
background-color: #FFF;
- min-height: 450px;
+ min-height: 600px;
-moz-box-shadow: 7px 0px 6px -2px #ddd;
-webkit-box-shadow: 7px 0px 6px -2px #ddd;
box-shadow: 7px 0px 6px -2px #ddd;
@@ -194,10 +221,10 @@
.layout-side-section {
width: 22%;
/*float: right;*/
- color: #606060;
+ color: #606060;
overflow-x: hidden;
padding: 15px;
- min-height: 450px;
+ min-height: 600px;
}
/* from bootstrap */
@@ -232,17 +259,20 @@
.avatar-small {
display: inline-block;
- min-width: 29px;
+ width: 24px;
+ height: 20px;
+ vertical-align: middle;
+ overflow: hidden;
+ margin: 0px 3px;
}
.avatar-small img {
- height: 24px;
- margin-bottom: -7px;
- max-width: 24px;
+ width: 24px;
}
/*
* lib/css/legacy/messages.css
*/
+
/* FLOATING MESSAGE */
.btn-img { cursor: pointer; }
@@ -291,9 +321,29 @@
text-align: center;
font-size: 14px;
}
+
/*
* lib/css/legacy/forms.css
- *//* FORMS */
+ */
+/* FORMS */
+
+div.form-section-head {
+ margin: 11px 0px 3px 0px;
+ border-top: 1px solid #ccc;
+ padding-top: 11px;
+}
+
+div.form-layout-row:first-child .form-section-head {
+ border-top: 0px solid #ccc !important;
+}
+
+div.form-section-head h3 {
+ line-height: 20px;
+}
+
+div.form-section-head hr {
+ margin: 9px 0px;
+}
div.frm_print_wrapper {
@@ -323,24 +373,6 @@
}
-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;
@@ -437,19 +469,14 @@
.datainputcell { padding: 2px 0px; }
-.field_description, .help {
- margin: 3px 0px 11px 0px;
- color: #888;
- font-style: italic;
+.help ol {
+ padding-left: 19px;
}
.field_description_top {
margin-bottom: 3px;
}
-.field_label {
- font-size:11px;
-}
.input_area input, select, textarea {
font-size: 14px;
padding: 2px;
@@ -500,7 +527,6 @@
}
div.sidebar-comment-message {
margin-top: 8px;
- font-size: 11px;
color: #777;
}
@@ -511,13 +537,14 @@
color: #444;
}
div.sidebar-comment-info {
- font-size: 10px;
color: #777;
}
+
/*
* lib/css/legacy/grid.css
*/
+
/* Grid */
@@ -638,19 +665,11 @@
}
.gridDivSelected option { border: 0px; }
+
/*
* lib/css/legacy/listing.css
- *//* listing 2.0 */
+ */
-div.listing-more {
- margin: 7px 0px 17px 0px;
- text-align: center;
- display: none;
-}
-
-div.listing-toolbar {
- margin: 7px 0px;
-}
/* SRS */
@@ -694,12 +713,10 @@
vertical-align: middle;
}
-
-
-
/*
* lib/css/legacy/report.css
*/
+
/* Reports */
div.report_grid_area {
@@ -878,103 +895,11 @@
width: 33%;
padding: 2px;
}
-/*
- * lib/css/legacy/autosuggest.css
- *//*
-================================================
-autosuggest, inquisitor style
-================================================
-*/
-
-div.autosuggest
-{
- position: absolute;
- margin-top: 3px;
- border: 1px solid #222;
-}
-
-div.autosuggest ul
-{
- list-style: none;
- margin: 0px;
- padding: 2px;
- overflow: hidden;
- background-color: #FFF;
-}
-
-div.autosuggest ul li
-{
- color: #444;
- padding: 0;
- margin: 0;
- text-align: left;
-}
-
-div.autosuggest ul li a
-{
- color: #444;
- display: block;
- text-decoration: none;
- position: relative;
- padding: 0;
- width: 100%;
-}
-div.autosuggest ul li a:hover
-{
-
-}
-div.autosuggest ul li.as_highlight a:hover
-{
- background-color: #45A;
- color: #FFF;
-}
-
-div.autosuggest ul li a span
-{
- display: block;
- padding: 3px 6px;
- color: #444;
- border-bottom:1px solid #DDD;
-}
-
-div.autosuggest ul li a span small
-{
- display: block;
- font-weight: normal;
- color: #444;
-}
-
-div.autosuggest ul li.as_highlight a span small
-{
- color: #FFF;
-}
-
-div.autosuggest ul li.as_highlight a span {
- color: #FFF;
-}
-
-div.autosuggest ul li.as_highlight a
-{
- color: #FFF;
- background-color: #45A;
- cursor: pointer;
-}
-
-div.autosuggest ul li.as_warning
-{
- font-weight: bold;
- text-align: center;
-}
-
-div.autosuggest ul em
-{
- font-style: normal;
- font-weight: bold;
-}
/*
* lib/css/legacy/dialog.css
- *//***** Dialogs *******/
+ */
+/***** Dialogs *******/
div.dialog_wrapper {
position: absolute;
@@ -1052,9 +977,11 @@
font-size: 12px;
}
+
/*
* lib/css/legacy/tabs.css
*/
+
/******* TABS ********/
div.box_label_wrapper {
@@ -1108,9 +1035,11 @@
ul.box_tabs li.box_tab_selected a {
color: #fff;
}
+
/*
* lib/css/legacy/sidebar.css
- */div.psidebar {
+ */
+div.psidebar {
}
div.psidebar div.head {
@@ -1126,9 +1055,8 @@
}
div.psidebar div.section-head {
- font-size: 12px;
padding: 5px 11px;
- border-bottom: 2px solid #444;
+ border-bottom: 1px solid #aaa;
}
div.psidebar div.section-body {
@@ -1140,12 +1068,685 @@
}
div.psidebar div.section-item, div.psidebar .section-link {
- font-size: 11px;
color: #666;
}
+
+/*
+ * lib/css/Aristo/aristo.selected.css
+ */
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
+.ui-widget-content a { color: #4F4F4F; }
+.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
+.ui-widget-header {
+ background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+ background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+}
+.ui-widget-header a { color: #4F4F4F; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+ background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+ background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+ -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+ -moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+ box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
+ outline: none;
+ color: #1c4257; border: 1px solid #7096ab;
+ background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
+ background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
+ background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
+.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
+.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
+
+/*
+ * jQuery UI Autocomplete 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete {
+ position: absolute; cursor: default; z-index: 3;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+ -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+ box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+}
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+ background: #5f83b9;
+ color: #FFFFFF;
+ border-color: #466086;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+
+/*
+ * jQuery UI Datepicker 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
+.ui-datepicker {
+ -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+ -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+ box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+}
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
+.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
+.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
+.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
+.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
+.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
+.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}
+
+
+
+/*
+ * lib/css/ui/list.css
+ */
+.hide {
+ display: none;
+}
+
+.list-filters {
+ margin: 7px 0px;
+}
+
+.wnlist .img-load {
+ display: none;
+ float: left;
+ margin-bottom: 8px;
+}
+
+/* list-row */
+div.list-row {
+ border-bottom: 1px solid #eee;
+ padding: 5px 0px;
+}
+div.list-row:hover {
+ background-color: #eef
+}
+
+div.list-row .label {
+ margin-right: 4px;
+}
+
+div.list-row table {
+ table-layout: fixed;
+ border-collapse: collapse;
+ width: 100%;
+}
+
+div.list-row table td {
+ overflow: hidden;
+ padding-right: 3px;
+ vertical-align: middle;
+ height: 24px;
+ max-height: 24px;
+}
+
+div.paging-button {
+ text-align: center;
+ padding: 11px 0px;
+}
+
+div.show_filters {
+ display: none;
+}
+
+div.filter_list {
+ padding: 13px;
+}
+
+div.show_filters.well {
+ margin-top: 11px;
+ margin-bottom: 11px;
+}
+
+div.filter_list .run_btn {
+ text-align: right;
+}
+
+div.filter_list .add_filter {
+ margin: 3px 0px;
+}
+
+div.list_filter {
+ margin: 7px 0px;
+}
+
+div.list_filter input, div.list_filter select {
+ width: 130px;
+ margin-right: 7px;
+}
+
+/* bar */
+
+span.bar-outer {
+ display: inline-block;
+ margin: 0px 7px;
+ margin-top: 3px;
+ background-color: #fff;
+ border: 1px solid #aaa;
+ height: 10px;
+}
+
+span.bar-inner {
+ display: inline-block;
+ background-color: #bdf;
+ height: 100%;
+ margin-bottom: 2px;
+ float: left;
+}
+span.bar-complete {
+ background-color: #009900;
+}
+span.bar-empty {
+ background-color: #990000;
+}
+
+
+/* stats */
+
+div.stat-wrapper {
+ margin-bottom: 19px;
+}
+
+div.stat-grid {
+ border: 2px solid #bbb;
+ background-color: white;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ overflow: hidden;
+}
+
+div.stat-label {
+ position: relative;
+ padding: 3px;
+ text-align: center;
+}
+div.stat-label, div.stat-label a {
+ z-index: 5;
+}
+
+div.stat-item {
+ position: relative;
+ border-bottom: 1px solid #ddd;
+}
+div.stat-item:last-child {
+ border-bottom: 0px solid #ddd;
+}
+
+div.stat-bar {
+ position: absolute;
+ left: 0px;
+ background-color: #def;
+ height: 100%;
+ z-index: 0;
+}
+
+
+
+
+
+/*
+ * lib/css/ui/fonts.css
+ */
+@font-face {
+ font-family: 'Pontano Sans';
+ font-style: normal;
+ font-weight: 800;
+ src: url('../lib/css/fonts/pontanosans.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'Droid Sans';
+ font-style: normal;
+ font-weight: normal;
+ src: local('Droid Sans'), local('DroidSans'), url('../lib/css/fonts/droidsans.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'PT Sans';
+ font-style: normal;
+ font-weight: normal;
+ src: local('PT Sans'), local('PTSans-Regular'), url('../lib/css/fonts/ptsans.woff') format('woff');
+}
+
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Open Sans'), local('OpenSans'), url('../lib/css/fonts/opensans.woff') format('woff');
+}
+@font-face {
+ font-family: 'Lato';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Lato Regular'), local('Lato-Regular'), url('../lib/css/fonts/lato.woff') format('woff');
+}
+
+
+
/*
* lib/css/bootstrap/headings.css
- *//* heading from bootstrap */
+ */
+/* heading from bootstrap */
h1,
h2,
@@ -1206,9 +1807,12 @@
color: #999999;
text-transform: uppercase;
}
+
/*
* lib/css/bootstrap/buttons.css
- */.close {
+ */
+.close {
+ font-family: Helvetica, Sans;
float: right;
font-size: 20px;
font-weight: bold;
@@ -1591,9 +2195,11 @@
.btn-small .caret {
margin-top: 4px;
}
+
/*
* lib/css/bootstrap/navbar.css
- */.nav {
+ */
+.nav {
margin-left: 0;
margin-bottom: 18px;
list-style: none;
@@ -2059,9 +2665,11 @@
padding: 0px 20px;
}
+
/*
* lib/css/bootstrap/dropdown.css
- */.dropdown {
+ */
+.dropdown {
position: relative;
}
.dropdown-toggle {
@@ -2161,9 +2769,11 @@
.dropdown.open .dropdown-menu {
display: block;
}
+
/*
* lib/css/bootstrap/tooltip.css
- */.tooltip {
+ */
+.tooltip {
position: absolute;
z-index: 1020;
display: block;
@@ -2329,9 +2939,11 @@
.popover-content p, .popover-content ul, .popover-content ol {
margin-bottom: 0;
}
+
/*
* lib/css/bootstrap/label.css
- */.label {
+ */
+.label {
padding: 2px 4px 3px;
font-size: 11.049999999999999px;
font-weight: bold;
@@ -2370,9 +2982,11 @@
.label-info:hover {
background-color: #2d6987;
}
+
/*
* lib/css/bootstrap/icons.css
- */[class^="icon-"], [class*=" icon-"] {
+ */
+[class^="icon-"], [class*=" icon-"] {
display: inline-block;
width: 14px;
height: 14px;
@@ -2749,16 +3363,114 @@
.icon-resize-horizontal {
background-position: -456px -118px;
}
+
+/*
+ * lib/css/bootstrap/popover.css
+ */
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+ margin-bottom: 0;
+}
+
/*
* erpnext/startup/startup.css
- */h1, h2, h3, h4, h5 {
- font-family: Tahoma, Arial, Verdana, sans-serif;
+ */
+h1, h2, h3, h4, h5 {
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
- font-size: 12px;
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
+ font-size: 13px;
}
span, div, td, input, textarea, button, select {
@@ -2766,7 +3478,11 @@
}
body {
- background: url(../images/stripedbg.png) repeat;
+ background: url(../images/redbeech.jpg) repeat;
+}
+
+.small {
+ font-size: 11.5px;
}
.erpnext-footer {
@@ -2835,3 +3551,4 @@
min-width: 160px !important;
max-width: 260px !important;
}
+
diff --git a/css/all-web.css b/css/all-web.css
index 36d9cda..6a75d12 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -1,7 +1,8 @@
/*
* lib/css/legacy/body.css
- */html {
+ */
+html {
margin: 0px;
padding: 0px;
}
@@ -10,7 +11,7 @@
margin: 0px;
padding: 0px;
font-family: Arial, Helvetica, Sans;
- font-size: 12px;
+ font-size: 14px;
color: #000;
background-color: #e2e2e2;
}
@@ -25,19 +26,22 @@
}
select, input, textarea {
- border: 1px solid #AAA;
+ border: 1px solid #ccc;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
- font-size: 13px;
+ font-size: inherit;
padding: 4px;
- color: #222;
+ color: #444;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
textarea {
font-family: inherit;
height: 120px;
width: 90%;
- font-size: 12px;
+ font-size: inherit;
white-space: normal;
}
@@ -100,8 +104,16 @@
div.comment { color: #444; }
+.small {
+ font-size: 11px;
+}
+
+.help {
+ margin: 3px 0px;
+ color: #888;
+}
+
div#body_div {
- position: relative;
display: none;
padding-right: 7px;
width: 900px;
@@ -109,15 +121,40 @@
margin-top: 56px;
}
-footer {
+.content {
width: 900px;
- margin: auto;
+ margin-bottom: 30px;
+}
+
+.background-fade-in {
+ -webkit-transition: background 1s ease-in; /* property duration timing-function delay */
+ -moz-transition: background 1s ease-in;
+ -o-transition: background 1s ease-in;
+ transition: background 1s ease-in;
+}
+
+footer {
+ position: absolute;
+ bottom: 0px;
+ width: 100%;
}
header .container {
width: 900px;
margin: auto;
}
+@media (max-width: 1200px) {
+ div#body_div, header .container, .content, #opened-page-selector, footer {
+ width: 900px;
+ }
+}
+
+@media (min-width: 1200px) {
+ div#body_div, header .container, .content, #opened-page-selector, footer {
+ width: 1100px;
+ }
+}
+
div.no_script {
display: none;
}
@@ -131,7 +168,6 @@
display: none;
text-align: center;
padding: 2px;
- font-size: 12px;
border: 1px solid #FF4;
}
@@ -156,27 +192,18 @@
-moz-border-radius: 5px;
border-radius: 5px;
}
-.gradient {
- background: #ededed; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #d1d1d1 47%, #b7b7b7 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(47%,#d1d1d1), color-stop(100%,#b7b7b7)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#b7b7b7',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
-}
.layout_wrapper, .layout-wrapper {
- -moz-box-shadow: 1px 1px 8px #555;
- -webkit-box-shadow: 1px 1px 8px #555;
- box-shadow: 1px 1px 8px #555;
+ -moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+ -webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+ box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
background-color: #fff;
padding: 15px;
+ margin-bottom: 30px;
}
.layout-wrapper-background {
- background-color: #f2f2f2 !important;
+ background-color: #fafafa !important;
padding: 0px;
}
@@ -185,7 +212,7 @@
float: left;
padding: 15px;
background-color: #FFF;
- min-height: 450px;
+ min-height: 600px;
-moz-box-shadow: 7px 0px 6px -2px #ddd;
-webkit-box-shadow: 7px 0px 6px -2px #ddd;
box-shadow: 7px 0px 6px -2px #ddd;
@@ -194,10 +221,10 @@
.layout-side-section {
width: 22%;
/*float: right;*/
- color: #606060;
+ color: #606060;
overflow-x: hidden;
padding: 15px;
- min-height: 450px;
+ min-height: 600px;
}
/* from bootstrap */
@@ -232,17 +259,20 @@
.avatar-small {
display: inline-block;
- min-width: 29px;
+ width: 24px;
+ height: 20px;
+ vertical-align: middle;
+ overflow: hidden;
+ margin: 0px 3px;
}
.avatar-small img {
- height: 24px;
- margin-bottom: -7px;
- max-width: 24px;
+ width: 24px;
}
/*
* lib/css/legacy/messages.css
*/
+
/* FLOATING MESSAGE */
.btn-img { cursor: pointer; }
@@ -291,9 +321,11 @@
text-align: center;
font-size: 14px;
}
+
/*
* lib/css/legacy/dialog.css
- *//***** Dialogs *******/
+ */
+/***** Dialogs *******/
div.dialog_wrapper {
position: absolute;
@@ -371,9 +403,11 @@
font-size: 12px;
}
+
/*
* lib/css/bootstrap/headings.css
- *//* heading from bootstrap */
+ */
+/* heading from bootstrap */
h1,
h2,
@@ -434,9 +468,12 @@
color: #999999;
text-transform: uppercase;
}
+
/*
* lib/css/bootstrap/buttons.css
- */.close {
+ */
+.close {
+ font-family: Helvetica, Sans;
float: right;
font-size: 20px;
font-weight: bold;
@@ -819,9 +856,11 @@
.btn-small .caret {
margin-top: 4px;
}
+
/*
* lib/css/bootstrap/navbar.css
- */.nav {
+ */
+.nav {
margin-left: 0;
margin-bottom: 18px;
list-style: none;
@@ -1287,9 +1326,11 @@
padding: 0px 20px;
}
+
/*
* lib/css/bootstrap/dropdown.css
- */.dropdown {
+ */
+.dropdown {
position: relative;
}
.dropdown-toggle {
@@ -1389,9 +1430,11 @@
.dropdown.open .dropdown-menu {
display: block;
}
+
/*
* lib/css/bootstrap/tooltip.css
- */.tooltip {
+ */
+.tooltip {
position: absolute;
z-index: 1020;
display: block;
@@ -1557,16 +1600,18 @@
.popover-content p, .popover-content ul, .popover-content ol {
margin-bottom: 0;
}
+
/*
* erpnext/startup/startup.css
- */h1, h2, h3, h4, h5 {
- font-family: Tahoma, Arial, Verdana, sans-serif;
+ */
+h1, h2, h3, h4, h5 {
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
- font-size: 12px;
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
+ font-size: 13px;
}
span, div, td, input, textarea, button, select {
@@ -1574,7 +1619,11 @@
}
body {
- background: url(../images/stripedbg.png) repeat;
+ background: url(../images/redbeech.jpg) repeat;
+}
+
+.small {
+ font-size: 11.5px;
}
.erpnext-footer {
@@ -1644,9 +1693,11 @@
max-width: 260px !important;
}
+
/*
* erpnext/website/css/website.css
- */.layout_wrapper {
+ */
+.layout_wrapper {
padding: 20px;
}
@@ -1757,4 +1808,4 @@
.web-footer-menu ul li:last-child {
border-right: 0px solid #777 !important;
-}
\ No newline at end of file
+}
diff --git a/css/style-app.css b/css/style-app.css
deleted file mode 100644
index f5447cf..0000000
--- a/css/style-app.css
+++ /dev/null
@@ -1,1850 +0,0 @@
-
-/*
- * lib/css/legacy/body.css
- */html {
- margin: 0px;
- padding: 0px;
-}
-
-body {
- margin: 0px;
- padding: 0px;
- font-family: Arial, Helvetica, Sans;
- font-size: 12px;
- color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0;
- font-weight: bold;
- color: #333333;
- text-rendering: optimizelegibility;
- margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- color: #999999;
-}
-h1 {
- font-size: 30px;
- line-height: 36px;
-}
-h1 small {
- font-size: 18px;
-}
-h2 {
- font-size: 24px;
- line-height: 36px;
-}
-h2 small {
- font-size: 18px;
-}
-h3 {
- line-height: 27px;
- font-size: 18px;
-}
-h3 small {
- font-size: 14px;
-}
-h4, h5, h6 {
- line-height: 18px;
-}
-h4 {
- font-size: 14px;
-}
-h4 small {
- font-size: 12px;
-}
-h5 {
- font-size: 12px;
-}
-h6 {
- font-size: 11px;
- color: #999999;
- text-transform: uppercase;
-}
-
-pre { margin: 0px; padding: 0px; }
-
-button { margin: 2px; margin-left: 0px; }
-
-label {
- padding-top: 15px;
- color: #404040;
-}
-
-select, input, textarea {
- border: 1px solid #AAA;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- font-size: 13px;
- padding: 4px;
- color: #222;
-}
-
-textarea {
- font-family: inherit;
- height: 120px;
- width: 90%;
- font-size: 12px;
- white-space: normal;
-}
-
-table { padding: 0px; border-collapse: 'collapse'}
-
-td {
- padding:0px;
- margin: 0px;
- vertical-align: top;
-}
-
-p {
- margin: 0px 0px 9px 0px;
- line-height: 1.5em;
-}
-
-li {
- line-height: 1.5em;
-}
-
-a:active { outline:none; }
-
-:focus { -moz-outline-style:none; }
-
-table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
-table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
-
-div.fix_ff_cursor { overflow: auto; }
-
-/* --- Layout --- */
-
-div.comment { color: #444; }
-
-div#body_div {
- position: relative;
- display: none;
- margin-top: 56px;
- padding-right: 7px;
-}
-
-div.no_script {
- display: none;
-}
-
-div.loading_div {
- position: absolute;
- background-color: #FFFFCC;
- z-index: 1999;
- right: 5px;
- width: 90px;
- display: none;
- text-align: center;
- padding: 2px;
- font-size: 12px;
- border: 1px solid #FF4;
-}
-
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
-div.std-footer {
- margin: 13px 0px;
- border-top: 1px solid #AAA;
- padding: 13px;
-}
-
-div.std-footer-item {
- margin: 0px 13px 13px 0px;
-}
-
-.shadow {
- -moz-box-shadow: 0px 2px 2px #888;
- -webkit-box-shadow: 0px 2px 2px #888;
- box-shadow: 0px 2px 2px #888;
-}
-
-.round {
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-}
-.gradient {
- background: #ededed; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #d1d1d1 47%, #b7b7b7 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(47%,#d1d1d1), color-stop(100%,#b7b7b7)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#b7b7b7',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
-}
-
-.header-gradient {
- background: #84827c; /* Old browsers */
- background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
- color: #FFF;
-}
-
-.layout_wrapper {
- padding: 15px;
- -moz-box-shadow: 1px 1px 6px #AAA;
- -webkit-box-shadow: 1px 1px 6px #AAA;
- box-shadow: 1px 1px 6px #AAA;
- background-color: #FFF;
-}
-
-/* from bootstrap */
-.container {
- margin-left: auto;
- margin-right: auto;
- zoom: 1;
-}
-.container:before, .container:after {
- display: table;
- content: "";
- zoom: 1;
-}
-.container:after {
- clear: both;
-}
-
-/*
- * lib/css/legacy/menus.css
- */
-/******** Menus - menu.js ************/
-
-ul.menu_toolbar {
- z-index: 30;
- padding: 0px;
- margin: 0px;
- margin-top: 1px;
-}
-
-ul.menu_toolbar li {
- list-style: none;
- margin: 0px;
- float: left;
-}
-
-.top_menu {
- margin: 0px;
- padding: 4px;
- cursor: pointer;
- color: #FFF;
- margin-right: 8px;
-}
-
-.top_menu_mo {
- background-color: #000;
-
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.menu_toolbar_dropdown {
- position: absolute;
- margin-top: 4px;
- margin-left: 8px;
- width: 140px;
- background-color: #FFF;
- color: #000;
- display: none;
- border: 2px solid #333;
- z-index: 31;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-div.dd_item {
- cursor: pointer;
- padding: 4px;
- background-color: #FFF;
-}
-div.dd_item_mo { background-color: #FE8; }
-/*
- * lib/css/legacy/messages.css
- */
-/* FLOATING MESSAGE */
-
-.btn-img { cursor: pointer; }
-
-div.fetching { color: #888; text-align:right; }
-
-div.notice {
- postion: absolute;
- background-color: #000;
- -moz-border-radius: 5px; -webkit-border-radius: 5px;
- opacity: 0.6;
- right: 0;
- top: 0;
- margin-top: 8px;
- z-index: -1;
- padding: 8px;
-}
-
-/** help **/
-
-.info-box {
- background-color: #F8F8F8;
- border: 1px solid #CCCCCC;
- border-radius: 3px 3px 3px 3px;
- line-height: 1.6em;
- overflow: auto;
- padding: 6px 10px;
- margin-bottom: 9px;
-}
-
-.help_box, .help-box {
- background-color:#FFC;
- font-size: 13px;
- color: #864;
- padding: 7px;
- margin: 11px 0px;
- border: 1px solid #EEB;
-}
-
-.help_box_big {
- background-color:#FFC;
- color: #864;
- padding: 7px;
- margin: 7px 0px;
- border: 1px solid #EEB;
- text-align: center;
- font-size: 14px;
-}
-/*
- * lib/css/legacy/forms.css
- *//* FORMS */
-
-
-div.frm_print_wrapper {
- background-color:#FFF;
- border:1px solid #444;
- padding: 40px;
-
- box-shadow:1px 1px 8px #229;
- -moz-box-shadow: 1px 1px 8px #229;
- -webkit-box-shadow: 1px 1px 8px #229;
-}
-
-div.page_break {
- margin: 24px 0px;
- border-top: 1px dashed #888;
-}
-
-div.grid_tbarlinks {
- border-bottom: 0px;
- background-color: #CCC;
- padding: 4px 4px 2px 4px;
- width: 180px;
- float: right;
-
- -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
- -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
-}
-
-
-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;
-}
-
-
-
-/*------------------*/
-
-.top_cell {
- height: 50px;
-}
-
-div.attach_area {
- padding: 8px;
- margin: 8px;
- background-color: #EEE;
-}
-
-div.attach_area table {
- width: 100%;
-}
-
-.tablabel_normal {
- margin: 0 4px 0 0;
- padding: 3px 5px;
- line-height: 1.3em;
- display: inline;
- cursor: pointer;
-}
-
-.tablabel_selected {
- margin: 0 4px 0 0;
- padding: 3px 5px;
- line-height: 1.3em;
- font-weight: bold;
- display: inline;
- cursor: pointer;
- color: #000;
-}
-
-.scrollhead_wrapper {
- position: absolute;
- z-index: 1;
- height: 30px;
-}
-
-.treeimg {
- cursor: pointer;
- margin-right: 3px;
-}
-
-
-.sectionCell {
- padding: 5px;
- vertical-align: top;
-}
-
-.code_area {
- width: 80%;
- margin: 8px;
- padding: 4px;
- background-color: #F8F8F8;
- border: 1px solid #CCC;
- overflow-x: auto;
-}
-
-.code_text {
- width: 100%;
- height: 360px;
- margin-top: 3px;
- font-family: Courier, Fixed;
- font-size: 12px;
-}
-
-div.time_field select{
- display: inline;
- margin: 2px;
- width: 45px;
-}
-
-/* Documents */
-
-.frm_field_table {
- width: 100%;
- border-collapse: collapse;
-}
-
-.datalabelcell {
- padding: 2px 0px;
- width: 160px;
- vertical-align: top;
-}
-.datainputcell { padding: 2px 0px; }
-
-
-.field_description, .help {
- margin: 3px 0px 11px 0px;
- color: #888;
- font-style: italic;
-}
-
-.field_description_top {
- margin-bottom: 3px;
-}
-
-.field_label {
- font-size:11px;
-}
-.input_area input, select, textarea {
- font-size: 14px;
- padding: 2px;
-}
-
-.input_area input {
- width: 80%;
- margin: 0px;
-}
-.input_area select {
- width: 80%;
-}
-.input_area textarea {
- width: 90%;
-}
-
-.disp_area {
- width: 80%;
- padding: 2px 0px;
- font-size: 12px;
-}
-.disp_area_no_val {
- height: 14px;
-}
-
-.no_img {
- padding: 40px;
- width: 100px;
- height: 20px;
- color: #888;
- text-align: center;
- border: 1px solid #AAA;
-}
-
-.input-mandatory {
- font-size: 14px !important;
- font-weight: bold;
-}
-
-.field-to-update {
- background-color:#FEE;
-}
-
-/* sidebar */
-
-div.sidebar-comment-wrapper input {
- width: 50%;
-}
-div.sidebar-comment-message {
- margin-top: 8px;
- font-size: 11px;
- color: #777;
-}
-
-div.sidebar-comment-text {
- font-size: 12px;
- font-weight: bold;
- margin-top: 8px;
- color: #444;
-}
-div.sidebar-comment-info {
- font-size: 10px;
- color: #777;
-}
-/*
- * lib/css/legacy/grid.css
- */
-
-/* Grid */
-
-
-/* --- Simple --- */
-.grid_wrapper_simple {
- width: 100%;
- margin-bottom: 8px;
- border: 1px solid #AA9;
-}
-
-.grid_head_wrapper_simple {
- padding: 0px;
- border-bottom: 2px solid #AAA;
-}
-
-.grid_head_wrapper_simple td {
- border-right: 1px solid #AA9;
-}
-
-.grid_head_wrapper_simple td div {
- padding: 2px;
-}
-
-.grid_tab_wrapper_simple {
-}
-
-.grid_cell_simple {
- padding: 2px;
- background-color: #fff;
- border-right: 1px solid #AA9;
-}
-
-
-/* --- Normal --- */
-.grid_wrapper {
- position: relative;
- overflow: auto;
- border: 1px solid #AAA;
- width: 100%;
- margin-bottom: 8px;
- background-color: #fff;
-}
-
-.grid_tab_wrapper {
- position: absolute;
- top: 40px;
- border-bottom: 1px solid #DDD;
-}
-
-.grid_table, .grid_head_table {
- table-layout: fixed;
- border-collapse: collapse;
- /*width: 100%;*/
-}
-
-.grid_cell {
- border-right: 1px solid #ddd;
- padding: 0px;
- background-color: #fff;
-}
-
-.grid_head_wrapper {
- position: absolute;
- z-index: 1;
- height: 40px;
- padding: 0px;
- overflow: hidden;
- /*background-color: #fff;*/
-}
-
-.grid_head_table td {
- background-color: #EEE;
- border-right: 1px solid #AAA;
- border-bottom: 1px solid #AAA;
- height: 40px;
- padding: 0px;
-}
-
-.grid_head_table td div {
- color: #222;
- font-weight: bold;
- overflow: hidden;
- padding: 2px 0px;
- text-align: center;
-}
-
-.grid_selector {
- padding: 1px;
- border-right: 1px solid #DDD;
- width: 20px;
- background-color: #fff;
-}
-
-.grid_cell_div {
- padding: 2px;
- cursor: pointer;
- overflow: hidden;
- border: 2px solid #FFF;
-}
-
-.grid_cell_div_selected {
- border: 2px solid #88f;
-}
-
-.grid_cell_div input, .grid_cell_div select, .grid_cell_div div input {
- margin: 0px;
- border: 0px;
- width: 100%;
- margin: 0px;
- }
-
-.grid_cell_div textarea {
- border: 3px solid #abf;
- height:200px;
- width: 300px;
- z-index: 10;
- position:absolute;
-}
-
-.gridDivSelected option { border: 0px; }
-/*
- * lib/css/legacy/listing.css
- *//* listing 2.0 */
-
-div.listing-more {
- margin: 7px 0px 17px 0px;
- text-align: center;
- display: none;
-}
-
-div.listing-toolbar {
- margin: 7px 0px;
-}
-
-/* SRS */
-
-table.srs_result_tab {
- border: 2px solid #AAA;
- border-collapse: collapse;
-}
-
-/* firefox bug fix for disappering borders */
-table.srs_result_tab td, table.srs_result_tab tr, table.srs_result_tab tbody, table.srs_result_tab div {
- position: static;
-}
-
-table.srs_result_tab td {
- padding: 3px 2px;
- position: static;
-}
-
-div.srs_body_area {
-}
-
-div.srs_results_area {
-}
-
-div.srs_filter_wrapper {
- border: 1px solid #CCF;
-
- background-color: #EEF;
- margin:0px 0px 8px 0px;
-
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-div.srs_filter_area {
- padding: 8px;
-}
-
-div.srs_filter_area td {
- vertical-align: middle;
-}
-
-
-
-
-/*
- * lib/css/legacy/report.css
- */
-/* Reports */
-
-div.report_grid_area {
- position: relative;
- padding: 8px;
-}
-
-
-div.report_tab {
- border: 1px solid #AAA;
- position: relative;
- overflow: auto;
-}
-
-div.report_no_data {
- padding: 8px;
- background-color: #EEE;
- border: 1px solid #DDD;
- position: absolute;
- margin-left: 40%;
- margin-top: 50px;
- display: none;
-}
-
-div.report_htitle {
- float: left;
- padding: 2px;
- font-size: 14px;
- font-weight: bold;
- margin-left: 4px;
- color: #665;
- /*font-weight: bold;*/
-}
-
-div.report_tbar {
- /*background: url('../images/ui/blue-back.gif') repeat-x; */
- background-color: #EEF;
- border: 1px solid #CCF;
- border-bottom: 0px;
- height: 28px;
-}
-
-div.report_tbar table{
- width: 100%;
-}
-div.report_tbar table td {
-
-}
-div.report_tbar table td div {
- position: relative;
-}
-div.report_tbar button, div.report_tbar select, div.report_tbar img {
- font-size: 11px;
- margin: 0px;
-}
-
-div.report_head_wrapper {
- position: absolute;
- height: 24px;
- top: 0px;
- z-index: 1;
-}
-
-div.report_tab_wrapper {
- position: absolute;
- border-bottom: 1px solid #AAA;
- border-top: 1px solid #AAA;
-}
-
-div.report_tab_wrapper table, div.report_head_wrapper table {
- table-layout: fixed;
- border-collapse: collapse;
- /*width: 100%;*/
-}
-
-div.report_tab_wrapper table td, div.report_head_wrapper table td {
- border-left: 1px solid #AAA;
- border-right: 1px solid #AAA;
- border-bottom: 1px solid #AAA;
- overflow: hidden;
- padding: 0px;
-}
-
-div.report_tab_wrapper table td div, div.report_head_wrapper table td div {
- padding: 3px;
- overflow: hidden;
-}
-
-.report_head_cell {
- background-color: #EEE;
- border-bottom: 1px solid #AA9;
- text-align: center;
- font-weight: bold;
-}
-.report_head_cell div {
- color:#222;
- height: 18px;
-}
-
-
-/* FINDER */
-
-div.finder_wrapper {
-}
-
-div.finder_body_area {
- margin: 16px;
-}
-
-div.finder_body {
- display: none;
-}
-
-div.finder_advanced_area table {
- width: 80%;
-}
-
-div.finder_advanced_area textarea {
- width: 80%;
-}
-
-div.finder_filter_area {
- position: relative;
-}
-
-div.filter_head {
- font-size: 14px;
- margin-bottom: 2px;
-}
-div.filter_dt_head {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 2px;
-}
-table.filter_tab {
- width: 96%;
- border-collapse: collapse;
-}
-
-table.filter_tab td {
- width: 50%;
-}
-
-div.finder_picker_area {
-
-}
-div.builder_field {
- margin: 0px;
-}
-div.builder_dt_head {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 2px;
-}
-
-div.builder_field table {
- width: 90%;
- border-collapse: collapse;
-}
-
-div.builder_label {
- height: 20px;
-}
-
-div.builder_head {
- font-size: 16px;
- font-weight: bold;
- color: #AB6;
-}
-
-table.builder_tab {
- width: 96%;
- border-collapse: collapse;
-}
-
-table.builder_tab td {
- width: 33%;
- padding: 2px;
-}
-/*
- * lib/css/legacy/calendar.css
- *//**** CALENDAR ****/
-
-.caldiv {
- position:absolute;
- visibility:hidden;
- background-color:white;
- width: 144px;
- z-index: 301; /* always on top(?) */
-}
-
-
-
-div.cal_wrapper { }
-div.cal_body {
- margin: 16px;
- background-color: #DDD;
- position: relative;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.cal_head {
- margin: 16px;
- margin-bottom: 0px;
-}
-div.cal_head div {
- font-size: 18px;
- color: #666;
- padding-top: 8px;
-}
-
-div.cal_view_body {
- margin: 16px;
-}
-
-div.cal_view_body_plain {
- margin: 16px;
-}
-
-div.cal_month_head {
-}
-
-div.cal_month_body {
- border-top: 1px solid #888;
-}
-
-.cal_month_headtable {
- /*table-layout:fixed;*/
- width: 100%;
-}
-
-.cal_month_name {
- width: 100%;
- color: #888;
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- padding: 4px;
-}
-
-.cal_month_headtable tr td{
- font-size: 12px;
- font-weight: bold;
- text-align: center;
- padding: 4px;
-}
-
-table.cal_month_table {
- border-collapse: collapse;
- /*table-layout:fixed;*/
- height: 100%;
- width: 100%;
-}
-
-table.cal_month_table td {
- width: 14.29%;
- height: 20%;
- /*overflow:hidden;*/
- padding:0px;
-}
-
-div.cal_month_date {
- width:100%;
- height:25%;
- font-size: 10px;
- overflow:hidden;
- /*background-color: #EEF;*/
-}
-
-div.cal_month_date_holiday {
- /*background-color: #FFF;*/
-}
-
-div.cal_month_unit {
- width:100%;
- height:75%;
- overflow:hidden;
- cursor:pointer;
- /*background-color:#FFF;*/
-}
-
-div.cal_vu_disabled {
- background-color:#FFF;
- cursor:default;
-}
-
-table.cal_day_table {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.cal_day_table td {
-}
-
-div.cal_day_body {
- width: 100%;
- height: 80%;
- overflow-y: auto;
- overflow-x: hidden;
- border-top: 1px solid #AAA;
-}
-
-div.cal_day_unit{
- width:100%;
- cursor:pointer;
-}
-
-table.cal_week_table {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.cal_week_table td {
- width: 12.5%;
-}
-
-div.cal_week_body {
- width: 100%;
- height: 80%;
- overflow-y: auto;
- overflow-x: hidden;
- border-top: 1px solid #888;
-}
-
-div.cal_week_unit{
- width: 100%;
- cursor:pointer;
-}
-
-div.cal_event {
- width: 100%;
- height: 12px;
- overflow: hidden;
- font-size: 11px;
- color: #00B;
- margin-bottom: 2px;
- text-decoration: underline;
-}
-
-div.cal_event_Public {
- color: GREEN;
-}
-
-div.cal_event_Private {
- color: BLUE;
-}
-
-div.cal_event_hover {
- text-decoration: underline;
-}
-
-/*
- * lib/css/legacy/autosuggest.css
- *//*
-================================================
-autosuggest, inquisitor style
-================================================
-*/
-
-div.autosuggest
-{
- position: absolute;
- margin-top: 3px;
- border: 1px solid #222;
-}
-
-div.autosuggest ul
-{
- list-style: none;
- margin: 0px;
- padding: 2px;
- overflow: hidden;
- background-color: #FFF;
-}
-
-div.autosuggest ul li
-{
- color: #444;
- padding: 0;
- margin: 0;
- text-align: left;
-}
-
-div.autosuggest ul li a
-{
- color: #444;
- display: block;
- text-decoration: none;
- position: relative;
- padding: 0;
- width: 100%;
-}
-div.autosuggest ul li a:hover
-{
-
-}
-div.autosuggest ul li.as_highlight a:hover
-{
- background-color: #45A;
- color: #FFF;
-}
-
-div.autosuggest ul li a span
-{
- display: block;
- padding: 3px 6px;
- color: #444;
- border-bottom:1px solid #DDD;
-}
-
-div.autosuggest ul li a span small
-{
- display: block;
- font-weight: normal;
- color: #444;
-}
-
-div.autosuggest ul li.as_highlight a span small
-{
- color: #FFF;
-}
-
-div.autosuggest ul li.as_highlight a span {
- color: #FFF;
-}
-
-div.autosuggest ul li.as_highlight a
-{
- color: #FFF;
- background-color: #45A;
- cursor: pointer;
-}
-
-div.autosuggest ul li.as_warning
-{
- font-weight: bold;
- text-align: center;
-}
-
-div.autosuggest ul em
-{
- font-style: normal;
- font-weight: bold;
-}
-
-/*
- * lib/css/legacy/dialog.css
- *//***** Dialogs *******/
-
-div.dialog_wrapper {
- position: absolute;
- width: 440px;
- display: none;
- z-index: 90;
- background-color: #FFF;
- border: 3px solid #222;
- box-shadow:1px 1px 5px #777;
- -moz-box-shadow: 1px 1px 5px #777;
- -webkit-box-shadow: 1px 1px 5px #777;
-
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.dialog_head {
- height: 22px;
- padding: 4px;
- background-color: #222;
- color: #FFF;
-}
-
-div.dialog_body {
- padding: 8px 4px 16px 4px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.dialog_back {
- position: fixed;
- display: none;
- top: 0px;
- left: 0px;
- bottom: 0px;
- right: 0px;
- background-color: #EEE;
- opacity: 0.6;
- z-index: 50;
- text-align: center;
-}
-
-div.dialog_message {
- display: none;
- position: absolute;
- width: 250px;
- font-size: 12px;
- z-index: 91;
- background-color:#FFF;
- padding: 12px;
- border: 1px solid #444;
-}
-
-div.dialog_row {
- padding: 8px 8px 0px 8px;
-}
-
-div.dialog_row table {
- width: 100%;
-}
-
-div.dialog_row table td {
-}
-
-div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
- width: 80%;
- font-size: 14px;
-}
-
-div.dialog_row table td textarea {
- width: 80%;
- height: 200px;
- font-size: 12px;
-}
-
-/*
- * lib/css/legacy/tabs.css
- */
-/******* TABS ********/
-
-div.box_label_wrapper {
- border-bottom: 6px solid #777;
-}
-
-div.box_label_body {
- height: 22px;
-}
-
-ul.box_tabs {
- margin: 0px;
- padding: 0px;
- list-style: none;
-}
-
-ul.box_tabs li {
- height: 22px;
- float:left;
- font-size: 12px;
- text-decoration: underline;
-
- background-color: #DDD;
-
- margin:0;
- margin-left: 4px;
- padding:0 0 0 9px;
- cursor: pointer;
-}
-
-ul.box_tabs a {
- display:block;
- padding:3px 15px 3px 6px;
- text-decoration:none;
-}
-
-ul.box_tabs li.box_tab_mouseover {
- background-color: #BBB;
-}
-
-
-ul.box_tabs li.box_tab_selected {
-/* background:url("../images/ui/rc/tab-left-CCC.gif") no-repeat left top;
- background-color: #ABABAB; */
-
- background-color: #777;
-
- background: -webkit-gradient(linear, left top, left bottom, from(#999), to(#777));
- background: -moz-linear-gradient(top, #999, #777);
-
- color: #FFF;
- font-weight:bold;
-
-}
-ul.box_tabs li.box_tab_selected a {
-/* background:url("../images/ui/rc/tab-right-CCC.gif") no-repeat right top; */
-}
-
-/*
- * lib/css/legacy/bw-icons.css
- */
-/** general icons **/
-
-.wn-icon { background: url('lib/images/icons/icons.png'); width: 16px; height: 16px; cursor: pointer; }
-.ic-2x2_grid { background-position: 0 0; }
-.ic-3x3_grid { background-position: 0 -36px; }
-.ic-3x3_grid_2 { background-position: 0 -72px; }
-.ic-air_signal { background-position: 0 -108px; }
-.ic-align_center { background-position: 0 -144px; }
-.ic-align_just { background-position: 0 -180px; }
-.ic-align_left { background-position: 0 -216px; }
-.ic-align_right { background-position: 0 -252px; }
-.ic-app_window { background-position: 0 -288px; }
-.ic-arrow_bottom { background-position: 0 -324px; }
-.ic-arrow_bottom_left { background-position: 0 -360px; }
-.ic-arrow_bottom_right { background-position: 0 -396px; }
-.ic-arrow_l { background-position: 0 -432px; }
-.ic-arrow_left { background-position: 0 -468px; }
-.ic-arrow_r { background-position: 0 -504px; }
-.ic-arrow_right { background-position: 0 -540px; }
-.ic-arrow_top { background-position: 0 -576px; }
-.ic-arrow_top_left { background-position: 0 -612px; }
-.ic-arrow_top_right { background-position: 0 -648px; }
-.ic-arrow_two_head { background-position: 0 -684px; }
-.ic-arrow_two_head_2 { background-position: 0 -720px; }
-.ic-attention { background-position: 0 -756px; }
-.ic-battery { background-position: 0 -792px; }
-.ic-bell { background-position: 0 -828px; }
-.ic-book { background-position: 0 -864px; }
-.ic-bookmark_1 { background-position: 0 -900px; }
-.ic-bookmark_2 { background-position: 0 -936px; }
-.ic-box { background-position: 0 -972px; }
-.ic-br_down { background-position: 0 -1008px; }
-.ic-br_next { background-position: 0 -1044px; }
-.ic-br_prev { background-position: 0 -1080px; }
-.ic-br_up { background-position: 0 -1116px; }
-.ic-brackets { background-position: 0 -1152px; }
-.ic-browser { background-position: 0 -1188px; }
-.ic-brush { background-position: 0 -1224px; }
-.ic-bug { background-position: 0 -1260px; }
-.ic-burst { background-position: 0 -1296px; }
-.ic-calc { background-position: 0 -1332px; }
-.ic-calendar_1 { background-position: 0 -1368px; }
-.ic-calendar_2 { background-position: 0 -1404px; }
-.ic-cancel { background-position: 0 -1440px; }
-.ic-case { background-position: 0 -1476px; }
-.ic-cc { background-position: 0 -1512px; }
-.ic-cert { background-position: 0 -1548px; }
-.ic-chart_bar { background-position: 0 -1584px; }
-.ic-chart_line { background-position: 0 -1620px; }
-.ic-chart_line_2 { background-position: 0 -1656px; }
-.ic-chart_pie { background-position: 0 -1692px; }
-.ic-checkbox_checked { background-position: 0 -1728px; }
-.ic-checkbox_unchecked { background-position: 0 -1764px; }
-.ic-checkmark { background-position: 0 -1800px; }
-.ic-clip { background-position: 0 -1836px; }
-.ic-clipboard_copy { background-position: 0 -1872px; }
-.ic-clipboard_cut { background-position: 0 -1908px; }
-.ic-clipboard_past { background-position: 0 -1944px; }
-.ic-clock { background-position: -36px 0; }
-.ic-cloud { background-position: -36px -36px; }
-.ic-cloud_rain { background-position: -36px -72px; }
-.ic-cog { background-position: -36px -108px; }
-.ic-comp { background-position: -36px -144px; }
-.ic-compass { background-position: -36px -180px; }
-.ic-contact_card { background-position: -36px -216px; }
-.ic-cube { background-position: -36px -252px; }
-.ic-cur_bp { background-position: -36px -288px; }
-.ic-cur_dollar { background-position: -36px -324px; }
-.ic-cur_euro { background-position: -36px -360px; }
-.ic-cur_yen { background-position: -36px -396px; }
-.ic-cursor_H_split { background-position: -36px -432px; }
-.ic-cursor_V_split { background-position: -36px -468px; }
-.ic-cursor_arrow { background-position: -36px -504px; }
-.ic-cursor_drag_arrow { background-position: -36px -540px; }
-.ic-cursor_drag_arrow_2 { background-position: -36px -576px; }
-.ic-cursor_drag_hand { background-position: -36px -612px; }
-.ic-cursor_hand { background-position: -36px -648px; }
-.ic-db { background-position: -36px -684px; }
-.ic-delete { background-position: -36px -720px; }
-.ic-doc_delete { background-position: -36px -756px; }
-.ic-doc_edit { background-position: -36px -792px; }
-.ic-doc_empty { background-position: -36px -828px; }
-.ic-doc_export { background-position: -36px -864px; }
-.ic-doc_import { background-position: -36px -900px; }
-.ic-doc_lines { background-position: -36px -936px; }
-.ic-doc_lines_stright { background-position: -36px -972px; }
-.ic-doc_minus { background-position: -36px -1008px; }
-.ic-doc_new { background-position: -36px -1044px; }
-.ic-doc_plus { background-position: -36px -1080px; }
-.ic-document { background-position: -36px -1116px; }
-.ic-download { background-position: -36px -1152px; }
-.ic-emotion_sad { background-position: -36px -1188px; }
-.ic-emotion_smile { background-position: -36px -1224px; }
-.ic-expand { background-position: -36px -1260px; }
-.ic-eye { background-position: -36px -1296px; }
-.ic-eye_inv { background-position: -36px -1332px; }
-.ic-facebook { background-position: -36px -1368px; }
-.ic-filter { background-position: -36px -1404px; }
-.ic-fire { background-position: -36px -1440px; }
-.ic-flag { background-position: -36px -1476px; }
-.ic-folder { background-position: -36px -1512px; }
-.ic-folder_arrow { background-position: -36px -1548px; }
-.ic-folder_delete { background-position: -36px -1584px; }
-.ic-folder_minus { background-position: -36px -1620px; }
-.ic-folder_open { background-position: -36px -1656px; }
-.ic-folder_plus { background-position: -36px -1692px; }
-.ic-font_bold { background-position: -36px -1728px; }
-.ic-font_italic { background-position: -36px -1764px; }
-.ic-font_size { background-position: -36px -1800px; }
-.ic-font_strokethrough { background-position: -36px -1836px; }
-.ic-font_underline { background-position: -36px -1872px; }
-.ic-game_pad { background-position: -36px -1908px; }
-.ic-globe_1 { background-position: -36px -1944px; }
-.ic-globe_2 { background-position: -72px 0; }
-.ic-globe_3 { background-position: -72px -36px; }
-.ic-google { background-position: -72px -72px; }
-.ic-hand_1 { background-position: -72px -108px; }
-.ic-hand_2 { background-position: -72px -144px; }
-.ic-hand_contra { background-position: -72px -180px; }
-.ic-hand_pro { background-position: -72px -216px; }
-.ic-headphones { background-position: -72px -252px; }
-.ic-heart { background-position: -72px -288px; }
-.ic-heart_empty { background-position: -72px -324px; }
-.ic-home { background-position: -72px -360px; }
-.ic-image_text { background-position: -72px -396px; }
-.ic-inbox { background-position: -72px -432px; }
-.ic-indent_decrease { background-position: -72px -468px; }
-.ic-indent_increase { background-position: -72px -504px; }
-.ic-info { background-position: -72px -540px; }
-.ic-iphone { background-position: -72px -576px; }
-.ic-key { background-position: -72px -612px; }
-.ic-layers_1 { background-position: -72px -648px; }
-.ic-layers_2 { background-position: -72px -684px; }
-.ic-lightbulb { background-position: -72px -720px; }
-.ic-lighting { background-position: -72px -756px; }
-.ic-link { background-position: -72px -792px; }
-.ic-list_bullets { background-position: -72px -828px; }
-.ic-list_num { background-position: -72px -864px; }
-.ic-magic_wand { background-position: -72px -900px; }
-.ic-mail { background-position: -72px -936px; }
-.ic-mail_2 { background-position: -72px -972px; }
-.ic-mic { background-position: -72px -1008px; }
-.ic-monitor { background-position: -72px -1044px; }
-.ic-movie { background-position: -72px -1080px; }
-.ic-music { background-position: -72px -1116px; }
-.ic-net_comp { background-position: -72px -1152px; }
-.ic-network { background-position: -72px -1188px; }
-.ic-notepad { background-position: -72px -1224px; }
-.ic-notepad_2 { background-position: -72px -1260px; }
-.ic-on-off { background-position: -72px -1296px; }
-.ic-openid { background-position: -72px -1332px; }
-.ic-padlock_closed { background-position: -72px -1368px; }
-.ic-padlock_open { background-position: -72px -1404px; }
-.ic-page_layout { background-position: -72px -1440px; }
-.ic-paragraph { background-position: -72px -1476px; }
-.ic-pencil { background-position: -72px -1512px; }
-.ic-phone { background-position: -72px -1548px; }
-.ic-phone_1 { background-position: -72px -1584px; }
-.ic-phone_2 { background-position: -72px -1620px; }
-.ic-phone_touch { background-position: -72px -1656px; }
-.ic-photo { background-position: -72px -1692px; }
-.ic-picture { background-position: -72px -1728px; }
-.ic-pin { background-position: -72px -1764px; }
-.ic-pin_2 { background-position: -72px -1800px; }
-.ic-pin_map { background-position: -72px -1836px; }
-.ic-pin_map_down { background-position: -72px -1872px; }
-.ic-pin_map_left { background-position: -72px -1908px; }
-.ic-pin_map_right { background-position: -72px -1944px; }
-.ic-pin_map_top { background-position: -108px 0; }
-.ic-pin_sq_down { background-position: -108px -36px; }
-.ic-pin_sq_left { background-position: -108px -72px; }
-.ic-pin_sq_right { background-position: -108px -108px; }
-.ic-pin_sq_top { background-position: -108px -144px; }
-.ic-playback_ff { background-position: -108px -180px; }
-.ic-playback_next { background-position: -108px -216px; }
-.ic-playback_pause { background-position: -108px -252px; }
-.ic-playback_play { background-position: -108px -288px; }
-.ic-playback_prev { background-position: -108px -324px; }
-.ic-playback_rec { background-position: -108px -360px; }
-.ic-playback_reload { background-position: -108px -396px; }
-.ic-playback_rew { background-position: -108px -432px; }
-.ic-playback_stop { background-position: -108px -468px; }
-.ic-preso { background-position: -108px -504px; }
-.ic-print { background-position: -108px -540px; }
-.ic-question { background-position: -108px -576px; }
-.ic-redo { background-position: -108px -612px; }
-.ic-rnd_br_down { background-position: -108px -648px; }
-.ic-rnd_br_first { background-position: -108px -684px; }
-.ic-rnd_br_last { background-position: -108px -720px; }
-.ic-rnd_br_next { background-position: -108px -756px; }
-.ic-rnd_br_prev { background-position: -108px -792px; }
-.ic-rnd_br_up { background-position: -108px -828px; }
-.ic-round { background-position: -108px -864px; }
-.ic-round_and_up { background-position: -108px -900px; }
-.ic-round_arrow_left { background-position: -108px -936px; }
-.ic-round_arrow_right { background-position: -108px -972px; }
-.ic-round_checkmark { background-position: -108px -1008px; }
-.ic-round_delete { background-position: -108px -1044px; }
-.ic-round_minus { background-position: -108px -1080px; }
-.ic-round_plus { background-position: -108px -1116px; }
-.ic-rss { background-position: -108px -1152px; }
-.ic-rss_sq { background-position: -108px -1188px; }
-.ic-sand { background-position: -108px -1224px; }
-.ic-sat_dish { background-position: -108px -1260px; }
-.ic-save { background-position: -108px -1296px; }
-.ic-server { background-position: -108px -1332px; }
-.ic-share { background-position: -108px -1368px; }
-.ic-shop_cart { background-position: -108px -1404px; }
-.ic-sound_high { background-position: -108px -1440px; }
-.ic-sound_low { background-position: -108px -1476px; }
-.ic-sound_mute { background-position: -108px -1512px; }
-.ic-spechbubble { background-position: -108px -1548px; }
-.ic-spechbubble_2 { background-position: -108px -1584px; }
-.ic-spechbubble_sq { background-position: -108px -1620px; }
-.ic-spechbubble_sq_line { background-position: -108px -1656px; }
-.ic-sq_br_down { background-position: -108px -1692px; }
-.ic-sq_br_first { background-position: -108px -1728px; }
-.ic-sq_br_last { background-position: -108px -1764px; }
-.ic-sq_br_next { background-position: -108px -1800px; }
-.ic-sq_br_prev { background-position: -108px -1836px; }
-.ic-sq_br_up { background-position: -108px -1872px; }
-.ic-sq_down { background-position: -108px -1908px; }
-.ic-sq_minus { background-position: -108px -1944px; }
-.ic-sq_next { background-position: -144px 0; }
-.ic-sq_plus { background-position: -144px -36px; }
-.ic-sq_prev { background-position: -144px -72px; }
-.ic-sq_up { background-position: -144px -108px; }
-.ic-square_shape { background-position: -144px -144px; }
-.ic-star { background-position: -144px -180px; }
-.ic-star_fav { background-position: -144px -216px; }
-.ic-star_fav_empty { background-position: -144px -252px; }
-.ic-sun { background-position: -144px -288px; }
-.ic-tag { background-position: -144px -324px; }
-.ic-tape { background-position: -144px -360px; }
-.ic-target { background-position: -144px -396px; }
-.ic-text_curstor { background-position: -144px -432px; }
-.ic-text_letter_t { background-position: -144px -468px; }
-.ic-top_right_expand { background-position: -144px -504px; }
-.ic-trash { background-position: -144px -540px; }
-.ic-twitter { background-position: -144px -576px; }
-.ic-twitter_2 { background-position: -144px -612px; }
-.ic-undo { background-position: -144px -648px; }
-.ic-user { background-position: -144px -684px; }
-.ic-users { background-position: -144px -720px; }
-.ic-wrench { background-position: -144px -756px; }
-.ic-wrench_plus { background-position: -144px -792px; }
-.ic-wrench_plus_2 { background-position: -144px -828px; }
-.ic-zoom { background-position: -144px -864px; }
-
-
-/*
- * lib/css/legacy/sidebar.css
- */div.psidebar-wrapper {
- margin: 0px 8px;
-}
-
-div.psidebar-head {
- font-size: 14px;
- font-weight: bold;
- color: #555;
- margin-bottom: 12px;
-}
-
-div.psidebar-section {
- background-color: #fff;
- border: 1px solid #b2b2b7;
- margin-bottom: 11px;
- overflow: hidden;
-}
-
-div.psidebar-section-head {
- font-size: 12px;
- padding: 5px 11px;
- 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 */
-}
-
-div.psidebar-section-body {
- margin: 7px 11px 11px 11px;
-}
-
-div.psidebar-section-item {
- margin-bottom: 7px;
-}
-
-.psidebar-section-link {
- font-size: 11px;
- color: #666;
-}
-
-div.follower-list {
- color: #666;
- margin-top: 7px;
- font-size: 11px;
-}
-/*
- * lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
- color: #ffffff;
-}
-.btn .close, .alert-message .close {
- font-family: Arial, sans-serif;
- line-height: 18px;
-}
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.success, .alert-message.success {
- background-color: #57a957;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -ms-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(top, #62c462, #57a957);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #57a957 #57a957 #3d773d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.info, .alert-message.info {
- background-color: #339bb9;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
- background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
- background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
- background-image: linear-gradient(top, #5bc0de, #339bb9);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #339bb9 #339bb9 #22697d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn {
- cursor: pointer;
- display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
- background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 5px 14px 6px;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 11px;
- line-height: normal;
- border: 1px solid #ccc;
- border-bottom-color: #bbb;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear all;
- -moz-transition: 0.1s linear all;
- -ms-transition: 0.1s linear all;
- -o-transition: 0.1s linear all;
- transition: 0.1s linear all;
-}
-.btn:hover {
- background-position: 0 -15px;
- color: #333;
- text-decoration: none;
-}
-.btn:focus {
- outline: 1px dotted #666;
-}
-.btn.primary {
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.active, .btn :active {
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn[disabled] {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn.large {
- font-size: 15px;
- line-height: normal;
- padding: 9px 14px 9px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-.btn.small {
- padding: 5px 7px 5px;
- font-size: 11px;
-}
-:root .alert-message, :root .btn {
- border-radius: 0 \0;
-}
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-
-/* CLose */
-
-.close {
- float: right;
- color: #000000;
- font-size: 15px;
- font-weight: bold;
- line-height: 13.5px;
- margin-bottom: -2px;
- text-shadow: 0 1px 0 #ffffff;
- filter: alpha(opacity=25);
- -khtml-opacity: 0.25;
- -moz-opacity: 0.25;
- opacity: 0.25;
- text-decoration: none;
-}
-.close:hover {
- color: #000000;
- text-decoration: none;
- filter: alpha(opacity=40);
- -khtml-opacity: 0.4;
- -moz-opacity: 0.4;
- opacity: 0.4;
- cursor: pointer;
- font-weight: bold;
-}
\ No newline at end of file
diff --git a/css/style-web.css b/css/style-web.css
deleted file mode 100644
index a80fa2d..0000000
--- a/css/style-web.css
+++ /dev/null
@@ -1,629 +0,0 @@
-
-/*
- * lib/css/legacy/body.css
- */html {
- margin: 0px;
- padding: 0px;
-}
-
-body {
- margin: 0px;
- padding: 0px;
- font-family: Arial, Helvetica, Sans;
- font-size: 12px;
- color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0;
- font-weight: bold;
- color: #333333;
- text-rendering: optimizelegibility;
- margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- color: #999999;
-}
-h1 {
- font-size: 30px;
- line-height: 36px;
-}
-h1 small {
- font-size: 18px;
-}
-h2 {
- font-size: 24px;
- line-height: 36px;
-}
-h2 small {
- font-size: 18px;
-}
-h3 {
- line-height: 27px;
- font-size: 18px;
-}
-h3 small {
- font-size: 14px;
-}
-h4, h5, h6 {
- line-height: 18px;
-}
-h4 {
- font-size: 14px;
-}
-h4 small {
- font-size: 12px;
-}
-h5 {
- font-size: 12px;
-}
-h6 {
- font-size: 11px;
- color: #999999;
- text-transform: uppercase;
-}
-
-pre { margin: 0px; padding: 0px; }
-
-button { margin: 2px; margin-left: 0px; }
-
-label {
- padding-top: 15px;
- color: #404040;
-}
-
-select, input, textarea {
- border: 1px solid #AAA;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- font-size: 13px;
- padding: 4px;
- color: #222;
-}
-
-textarea {
- font-family: inherit;
- height: 120px;
- width: 90%;
- font-size: 12px;
- white-space: normal;
-}
-
-table { padding: 0px; border-collapse: 'collapse'}
-
-td {
- padding:0px;
- margin: 0px;
- vertical-align: top;
-}
-
-p {
- margin: 0px 0px 9px 0px;
- line-height: 1.5em;
-}
-
-li {
- line-height: 1.5em;
-}
-
-a:active { outline:none; }
-
-:focus { -moz-outline-style:none; }
-
-table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
-table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
-
-div.fix_ff_cursor { overflow: auto; }
-
-/* --- Layout --- */
-
-div.comment { color: #444; }
-
-div#body_div {
- position: relative;
- display: none;
- margin-top: 56px;
- padding-right: 7px;
-}
-
-div.no_script {
- display: none;
-}
-
-div.loading_div {
- position: absolute;
- background-color: #FFFFCC;
- z-index: 1999;
- right: 5px;
- width: 90px;
- display: none;
- text-align: center;
- padding: 2px;
- font-size: 12px;
- border: 1px solid #FF4;
-}
-
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
-div.std-footer {
- margin: 13px 0px;
- border-top: 1px solid #AAA;
- padding: 13px;
-}
-
-div.std-footer-item {
- margin: 0px 13px 13px 0px;
-}
-
-.shadow {
- -moz-box-shadow: 0px 2px 2px #888;
- -webkit-box-shadow: 0px 2px 2px #888;
- box-shadow: 0px 2px 2px #888;
-}
-
-.round {
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-}
-.gradient {
- background: #ededed; /* Old browsers */
- background: -moz-linear-gradient(top, #ededed 0%, #d1d1d1 47%, #b7b7b7 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(47%,#d1d1d1), color-stop(100%,#b7b7b7)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#b7b7b7',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
-}
-
-.header-gradient {
- background: #84827c; /* Old browsers */
- background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
- color: #FFF;
-}
-
-.layout_wrapper {
- padding: 15px;
- -moz-box-shadow: 1px 1px 6px #AAA;
- -webkit-box-shadow: 1px 1px 6px #AAA;
- box-shadow: 1px 1px 6px #AAA;
- background-color: #FFF;
-}
-
-/* from bootstrap */
-.container {
- margin-left: auto;
- margin-right: auto;
- zoom: 1;
-}
-.container:before, .container:after {
- display: table;
- content: "";
- zoom: 1;
-}
-.container:after {
- clear: both;
-}
-
-/*
- * lib/css/legacy/menus.css
- */
-/******** Menus - menu.js ************/
-
-ul.menu_toolbar {
- z-index: 30;
- padding: 0px;
- margin: 0px;
- margin-top: 1px;
-}
-
-ul.menu_toolbar li {
- list-style: none;
- margin: 0px;
- float: left;
-}
-
-.top_menu {
- margin: 0px;
- padding: 4px;
- cursor: pointer;
- color: #FFF;
- margin-right: 8px;
-}
-
-.top_menu_mo {
- background-color: #000;
-
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.menu_toolbar_dropdown {
- position: absolute;
- margin-top: 4px;
- margin-left: 8px;
- width: 140px;
- background-color: #FFF;
- color: #000;
- display: none;
- border: 2px solid #333;
- z-index: 31;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-div.dd_item {
- cursor: pointer;
- padding: 4px;
- background-color: #FFF;
-}
-div.dd_item_mo { background-color: #FE8; }
-/*
- * lib/css/legacy/messages.css
- */
-/* FLOATING MESSAGE */
-
-.btn-img { cursor: pointer; }
-
-div.fetching { color: #888; text-align:right; }
-
-div.notice {
- postion: absolute;
- background-color: #000;
- -moz-border-radius: 5px; -webkit-border-radius: 5px;
- opacity: 0.6;
- right: 0;
- top: 0;
- margin-top: 8px;
- z-index: -1;
- padding: 8px;
-}
-
-/** help **/
-
-.info-box {
- background-color: #F8F8F8;
- border: 1px solid #CCCCCC;
- border-radius: 3px 3px 3px 3px;
- line-height: 1.6em;
- overflow: auto;
- padding: 6px 10px;
- margin-bottom: 9px;
-}
-
-.help_box, .help-box {
- background-color:#FFC;
- font-size: 13px;
- color: #864;
- padding: 7px;
- margin: 11px 0px;
- border: 1px solid #EEB;
-}
-
-.help_box_big {
- background-color:#FFC;
- color: #864;
- padding: 7px;
- margin: 7px 0px;
- border: 1px solid #EEB;
- text-align: center;
- font-size: 14px;
-}
-/*
- * lib/css/legacy/dialog.css
- *//***** Dialogs *******/
-
-div.dialog_wrapper {
- position: absolute;
- width: 440px;
- display: none;
- z-index: 90;
- background-color: #FFF;
- border: 3px solid #222;
- box-shadow:1px 1px 5px #777;
- -moz-box-shadow: 1px 1px 5px #777;
- -webkit-box-shadow: 1px 1px 5px #777;
-
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.dialog_head {
- height: 22px;
- padding: 4px;
- background-color: #222;
- color: #FFF;
-}
-
-div.dialog_body {
- padding: 8px 4px 16px 4px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.dialog_back {
- position: fixed;
- display: none;
- top: 0px;
- left: 0px;
- bottom: 0px;
- right: 0px;
- background-color: #EEE;
- opacity: 0.6;
- z-index: 50;
- text-align: center;
-}
-
-div.dialog_message {
- display: none;
- position: absolute;
- width: 250px;
- font-size: 12px;
- z-index: 91;
- background-color:#FFF;
- padding: 12px;
- border: 1px solid #444;
-}
-
-div.dialog_row {
- padding: 8px 8px 0px 8px;
-}
-
-div.dialog_row table {
- width: 100%;
-}
-
-div.dialog_row table td {
-}
-
-div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
- width: 80%;
- font-size: 14px;
-}
-
-div.dialog_row table td textarea {
- width: 80%;
- height: 200px;
- font-size: 12px;
-}
-
-/*
- * lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
- color: #ffffff;
-}
-.btn .close, .alert-message .close {
- font-family: Arial, sans-serif;
- line-height: 18px;
-}
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.success, .alert-message.success {
- background-color: #57a957;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -ms-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(top, #62c462, #57a957);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #57a957 #57a957 #3d773d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.info, .alert-message.info {
- background-color: #339bb9;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
- background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
- background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
- background-image: linear-gradient(top, #5bc0de, #339bb9);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #339bb9 #339bb9 #22697d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn {
- cursor: pointer;
- display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
- background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 5px 14px 6px;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 11px;
- line-height: normal;
- border: 1px solid #ccc;
- border-bottom-color: #bbb;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear all;
- -moz-transition: 0.1s linear all;
- -ms-transition: 0.1s linear all;
- -o-transition: 0.1s linear all;
- transition: 0.1s linear all;
-}
-.btn:hover {
- background-position: 0 -15px;
- color: #333;
- text-decoration: none;
-}
-.btn:focus {
- outline: 1px dotted #666;
-}
-.btn.primary {
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.btn.active, .btn :active {
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn[disabled] {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn.large {
- font-size: 15px;
- line-height: normal;
- padding: 9px 14px 9px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-}
-.btn.small {
- padding: 5px 7px 5px;
- font-size: 11px;
-}
-:root .alert-message, :root .btn {
- border-radius: 0 \0;
-}
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-
-/* CLose */
-
-.close {
- float: right;
- color: #000000;
- font-size: 15px;
- font-weight: bold;
- line-height: 13.5px;
- margin-bottom: -2px;
- text-shadow: 0 1px 0 #ffffff;
- filter: alpha(opacity=25);
- -khtml-opacity: 0.25;
- -moz-opacity: 0.25;
- opacity: 0.25;
- text-decoration: none;
-}
-.close:hover {
- color: #000000;
- text-decoration: none;
- filter: alpha(opacity=40);
- -khtml-opacity: 0.4;
- -moz-opacity: 0.4;
- opacity: 0.4;
- cursor: pointer;
- font-weight: bold;
-}
\ No newline at end of file
diff --git a/erpnext/accounts/Module Def/Accounts/Accounts.txt b/erpnext/accounts/Module Def/Accounts/Accounts.txt
deleted file mode 100644
index f9c36c8..0000000
--- a/erpnext/accounts/Module Def/Accounts/Accounts.txt
+++ /dev/null
@@ -1,411 +0,0 @@
-# Module Def, Accounts
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-09-25 10:50:37',
- 'docstatus': 0,
- 'modified': '2011-12-07 16:18:28',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Accounts',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Accounts',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'doctype_list': 'GL Mapper, Journal Voucher\nGL Mapper, Payable Voucher\nGL Mapper, Receivable Voucher\nDocType Label, Receivable Voucher\nDocType Label, Payable Voucher',
- 'file_list': 'finance.gif,FileData/00210',
- 'is_hidden': 'No',
- 'last_updated_date': '2010-12-08 10:13:30',
- 'module_desc': 'Data about your payables, receivables and books of accounts',
- 'module_icon': 'Accounts.gif',
- 'module_label': 'Accounts',
- 'module_name': 'Accounts',
- 'module_seq': 5,
- 'name': '__common__'
- },
-
- # Module Def, Accounts
- {
- 'doctype': u'Module Def',
- 'name': 'Accounts'
- },
-
- # Module Def Item
- {
- 'click_function': "show_chart_browser('Accounts Browser','Account')",
- 'description': 'Manage your accounts',
- 'display_name': 'Chart of Accounts',
- 'doc_name': 'Accounts Browser',
- 'doc_type': 'Pages',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'click_function': "show_chart_browser('Accounts Browser','Cost Center')",
- 'description': 'Manage your cost centers',
- 'display_name': 'Chart of Cost Centers',
- 'doc_name': 'Accounts Browser',
- 'doc_type': 'Pages',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Regular journal entry',
- 'display_name': 'Journal Voucher',
- 'doc_name': 'Journal Voucher',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'voucher_type\nvoucher_date\nfiscal_year\ntotal_debit\ntotal_credit'
- },
-
- # Module Def Item
- {
- 'description': 'Outgoing Invoice to your customers',
- 'display_name': 'Sales Invoice',
- 'doc_name': 'Receivable Voucher',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'voucher_date\ndue_date\ndebit_to\ngrand_total\noutstanding_amount'
- },
-
- # Module Def Item
- {
- 'description': 'Incoming invoice from your service providers',
- 'display_name': 'Purchase Invoice',
- 'doc_name': 'Payable Voucher',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'voucher_date\ncredit_to\nbill_no\ngrand_total\noutstanding_amount'
- },
-
- # Module Def Item
- {
- 'description': 'Lease Agreement for Vehicles',
- 'display_name': 'Lease Agreement',
- 'doc_name': 'Lease Agreement',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Profit & Loss and Balance Sheet builder',
- 'display_name': 'Financial Statements',
- 'doc_name': 'Financial Statements',
- 'doc_type': 'Pages',
- 'doctype': 'Module Def Item',
- 'icon': 'table.gif'
- },
-
- # Module Def Item
- {
- 'description': 'Update your actual clearance dates and find out if bank ledger tallies with your bank statement.',
- 'display_name': 'Bank Reconciliation',
- 'doc_name': 'Bank Reconciliation',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Link your invoices and payment vouchers to clear/update outstanding amount',
- 'display_name': 'Internal Reconciliation',
- 'doc_name': 'Internal Reconciliation',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'TDS Payment',
- 'doc_name': 'TDS Payment',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'TDS Return Acknowledgement',
- 'doc_name': 'TDS Return Acknowledgement',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Form 16A',
- 'doc_name': 'Form 16A',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Account closing entry (Profit Booking) on any date',
- 'display_name': 'Period Closing Voucher',
- 'doc_name': 'Period Closing Voucher',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'You can export balance of selected ledgers within a specific period',
- 'display_name': 'Ledger Balance Export',
- 'doc_name': 'Ledger Balance Export',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Track C-Form received from customers',
- 'display_name': 'C-Form',
- 'doc_name': 'C-Form',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'General Ledger',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Accounts Receivable',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Accounts Payable',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Bank Reconciliation Statement',
- 'doc_name': 'Journal Voucher Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Trial Balance',
- 'doc_name': 'Account',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Register',
- 'doc_name': 'Receivable Voucher',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Purchase Register',
- 'doc_name': 'Payable Voucher',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Bank Clearance report',
- 'doc_name': 'Journal Voucher Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Monthly Ledger Summary Report',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Collection Report',
- 'doc_name': 'Journal Voucher Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Total amout collection for a period - Customerwise',
- 'doc_name': 'Account',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Payment Report',
- 'doc_name': 'Journal Voucher Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Sales Register',
- 'doc_name': 'RV Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Purchase Register',
- 'doc_name': 'PV Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Cost Center wise Expense',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'TDS Return',
- 'doc_name': 'TDS Payment Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Budget Variance Report',
- 'doc_name': 'Budget Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Payment Receipt Report',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Track total commission given to your Business Associate',
- 'display_name': 'Business Associate Commission Report',
- 'doc_name': 'Receivable Voucher',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Agreement List',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Monthly Future Installment Inflows',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Overdue Age Wise',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Overdue List',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Receipts Client Wise',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Lease Yearly Future Installment Inflows',
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Voucher wise tax details',
- 'doc_name': 'RV Tax Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Accounts Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Accounts User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
index 6a7e835..8664b38 100644
--- a/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
+++ b/erpnext/accounts/Print Format/POS Invoice/POS Invoice.txt
@@ -3,25 +3,26 @@
# These values are common in all dictionaries
{
- 'creation': '2011-10-19 14:27:47',
+ 'creation': '2011-12-21 11:08:55',
'docstatus': 0,
- 'modified': '2011-10-19 14:29:45',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-20 12:29:49',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all Print Format
{
+ 'doc_type': u'Receivable Voucher',
'doctype': 'Print Format',
- 'html': '<html>\n<head>\n<!--Other charges function-->\n<script>\n var make_row = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n return \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n +\'</tr>\'\n }\n var make_row1 = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n \n return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n +\'</tr>\'\n }\n\nfunction get_letter_head() {\n\t// add letter head\n\tvar cp = locals[\'Control Panel\'][\'Control Panel\'];\n\tif(doc.letter_head)\n\t\tvar lh= cstr(_p.letter_heads[doc.letter_head]);\n\telse if(cp.letter_head)\n\t\tvar lh= cp.letter_head;\n\telse \n\t\tvar lh= \'\';\n\t\t\n\treturn lh;\n}\n\n function get_tax_details(){\n \n var cl = getchildren(\'RV Tax Detail\',doc.name,\'other_charges\');\n var out = \'\';\n\n// if(cl.length){\n out += \'<div><table style="float: right;">\';\n for(var i=0;i<cl.length;i++){\n out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n }\n\n out += make_row1(\'TOTAL\',fmt_money(doc.grand_total),1);\n // }\n out +=\'</table></div>\';\n return out;\n }\n function get_other_charges(){\n var out =\'\';\n out += \'<div><table cssClass="noborder" style="width:100%">\';\n \n out += make_row(\'Net Total\',fmt_money(convert_rate(doc.net_total)),1)\n +make_row(\'Total Taxes\',fmt_money(convert_rate(doc.other_charges_total)),0)\n +make_row(\'Grand Total\',fmt_money(convert_rate(doc.grand_total)),1)\n +make_row(\'Rounded Total\',fmt_money(convert_rate(doc.rounded_total)),1)\n +make_row(\'Outstanding Amount\',fmt_money(convert_rate(doc.outstanding_amount)),1)\n out += \'</table></div>\';\n return out;\n }\n\n \n function convert_rate(val){ \n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n }\n \n</script>\n</head>\n<body>\n\n<div><script>get_letter_head()</script></div>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n<td align="left">NO: <script>doc.name</script></td>\n<td align="right">DATE: <script>date.str_to_user(doc.voucher_date)</script></td>\n</tr>\n<tr>\n<td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n <script>\n var t = print_table(\'Receivable Voucher\', doc.name, \'entries\', \'RV Detail\', [\'description\',\'qty\',\'basic_rate\',\'amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'], [\'35%\',\'20%\',\'20%\',\'25%\'])\n if(t.appendChild) {\n // single\n out = t.innerHTML.replace(/border: 1px/gi,\'border: 0px\').replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n }\n else {//multiple\n out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n for(var i=0;i<t.length;i++) \n {\n\t\tif(i==0)\n\t\t{\n\t\t\tout+=\'<tr>\'+t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML.replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')+\'</tr>\'\n\t\t}\n\t\tout+=\'<tr>\'+t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML.replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')+\'</tr>\'\n }\n\tout += \'</table>\'\n }\n out;\n </script>\n\n</div>\n\n<!--Tax table-->\n<div><script>get_tax_details();</script>\n </table>\n</div>\n\n<br>\n<table style="font-family:courier new;">\n<tr><td><b><script>doc.terms</script></b></td></tr>\n<tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n<tr><td> </td></tr>\n<tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>',
- 'module': 'Accounts',
+ 'html': u'<html>\n<head>\n<!--Other charges function-->\n<script>\nvar make_row = function(title,val,bold){\nvar bstart = \'<b>\'; var bend = \'</b>\';\nreturn \'<tr><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:20%">\'+doc.currency+\'</td>\'\n +\'<td style="width:30%;text-align:right">\'+(val?val:\'0.00\')+\'</td>\'\n +\'</tr>\'\n}\nvar make_row1 = function(title,val,bold){\n var bstart = \'<b>\'; var bend = \'</b>\';\n \n return \'<tr style="font-family:courier new; line-height:150%"><td style="width:50%">\'+(bold?bstart:\'\')+title+(bold?bend:\'\')+\'</td>\'\n +\'<td style="width:50%;text-align:right">\'+(bold?bstart:\'\')+(val?val:\'0.00\')+(bold?bend:\'\')+\'</td>\'\n +\'</tr>\'\n}\n\nfunction get_letter_head() {\n // add letter head\n var cp = wn.boot.control_panel;\n if(doc.letter_head)\n var lh= cstr(_p.letter_heads[doc.letter_head]);\n else if(cp.letter_head)\n var lh= cp.letter_head;\n else \n var lh= \'\';\n \n return lh;\n}\n\nfunction get_tax_details(){\n var cl = getchildren(\'RV Tax Detail\',doc.name,\'other_charges\');\n var out = \'\';\n\n out += \'<div><table style="float: right;">\';\n for(var i=0;i<cl.length;i++){\n if(cl[i].tax_amount) {\n out += make_row1(cl[i].description,fmt_money(convert_rate(cl[i].tax_amount)),0);\n }\n }\n out += make_row1(\'TOTAL\',doc.currency + " " + fmt_money(convert_rate(doc.grand_total)),1);\n out +=\'</table></div>\';\n return out;\n}\n\nfunction convert_rate(val){ \n var new_val = flt(val)/flt(doc.conversion_rate);\n return new_val;\n}\n</script>\n<style>\n table, td, tr, div, span {\n font-family: courier new;\n line-height: 200%;\n }\n</style>\n</head>\n\n<body>\n<table width="100%" style="font-family: courier new; line-height:200%">\n<tr>\n <td align="left">NO: <script>doc.name</script></td>\n <td align="right">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n</tr>\n<tr>\n <td>M/s <script>doc.contact_display</script></td>\n</tr>\n</table>\n<!--Item Table-->\n<div>\n<script>\nvar t = print_table(\'Receivable Voucher\', doc.name, \'entries\', \'RV Detail\',\n [\'description\',\'qty\',\'export_rate\',\'export_amount\'], [\'ITEM\', \'QTY\',\'RATE\',\'AMOUNT\'],\n [\'35%\',\'20%\',\'20%\',\'25%\']);\nif(t.appendChild) { // single\n out = t.innerHTML.replace(/style="/gi,\'style="font-family:courier new;line-height:150%;\');\n} else { //multiple\n out = \'<table class="None" border="0px" width="100%" style="border:0px; font-family:courier-new">\';\n\n for(var i=0;i<t.length;i++) {\n if(i==0) {\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[0].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'<tr>\' + t[i].childNodes[0].childNodes[0].childNodes[1].innerHTML\n .replace(/style="border: 1px solid rgb\\(0, 0, 0\\);/gi,\'style="font-family:courier new;\')\n + \'</tr>\';\n }\n out += \'</table>\';\n}\nout;\n</script>\n</div>\n<!--Tax table-->\n<div><script>get_tax_details();</script></div><br />\n<table style="font-family:courier new;">\n <tr><td><b><script>doc.terms</script></b></td></tr>\n <tr><td nowrap><b>For <script>doc.company</script></b></td></tr>\n <tr><td> </td></tr>\n <tr><td nowrap><b>Signatory</b></td></tr>\n</table>\n</body>\n</html>\n',
+ 'module': u'Accounts',
'name': '__common__',
- 'standard': 'Yes'
+ 'standard': u'Yes'
},
# Print Format, POS Invoice
{
'doctype': 'Print Format',
- 'name': 'POS Invoice'
+ 'name': u'POS Invoice'
}
]
\ No newline at end of file
diff --git a/erpnext/accounts/Role/Accounts Manager/Accounts Manager.txt b/erpnext/accounts/Role/Accounts Manager/Accounts Manager.txt
deleted file mode 100644
index 6f6759c..0000000
--- a/erpnext/accounts/Role/Accounts Manager/Accounts Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Accounts Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-03-19 14:57:46',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Accounts',
- 'name': '__common__',
- 'role_name': 'Accounts Manager'
- },
-
- # Role, Accounts Manager
- {
- 'doctype': 'Role',
- 'name': 'Accounts Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/accounts/Role/Accounts User/Accounts User.txt b/erpnext/accounts/Role/Accounts User/Accounts User.txt
deleted file mode 100644
index 519924e..0000000
--- a/erpnext/accounts/Role/Accounts User/Accounts User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Accounts User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-04-08 12:05:21',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Accounts',
- 'name': '__common__',
- 'role_name': 'Accounts User'
- },
-
- # Role, Accounts User
- {
- 'doctype': 'Role',
- 'name': 'Accounts User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py
index 44d6aec..9df7240 100644
--- a/erpnext/accounts/__init__.py
+++ b/erpnext/accounts/__init__.py
@@ -18,6 +18,11 @@
from webnotes.utils import flt
from webnotes.model.code import get_obj
+install_docs = [
+ {"doctype":"Role", "name":"Accounts Manager"},
+ {"doctype":"Role", "name":"Accounts User"}
+]
+
@webnotes.whitelist()
def get_default_bank_account():
"""
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 93bef5d..fa98441 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -560,10 +560,12 @@
<table cellspacing= "5" cellpadding="5" width = "100%%">
<tr>
<td width = "50%%"><b>Customer</b><br>%s<br>%s</td>
- <td width = "50%%">Invoice Date: %s<br>Due Date: %s</td>
+ <td width = "50%%">Invoice Date : %s<br>Invoice Period : %s to %s <br>Due Date : %s</td>
</tr>
</table>
- ''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, new_rv.doc.posting_date, new_rv.doc.due_date)
+ ''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
+ getdate(add_days(add_months(new_rv.doc.posting_date, -1), 1)).strftime("%d-%m-%Y"), getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"),\
+ getdate(new_rv.doc.due_date).strftime("%d-%m-%Y"))
tbl = '''<table border="1px solid #CCC" width="100%%" cellpadding="0px" cellspacing="0px">
@@ -596,10 +598,10 @@
</table>
</td>
</tr>
- <tr><td>Terms:</td></tr>
+ <tr><td>Terms and Conditions:</td></tr>
<tr><td>%s</td></tr>
</table>
- ''' % (new_rv.doc.net_total, new_rv.doc.total_tax,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms)
+ ''' % (new_rv.doc.net_total, new_rv.doc.other_charges_total,new_rv.doc.grand_total, new_rv.doc.in_words,new_rv.doc.terms)
msg = hd + tbl + totals
diff --git a/erpnext/accounts/doctype/journal_voucher/listview.js b/erpnext/accounts/doctype/journal_voucher/listview.js
new file mode 100644
index 0000000..5d7f85a
--- /dev/null
+++ b/erpnext/accounts/doctype/journal_voucher/listview.js
@@ -0,0 +1,34 @@
+wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d);
+ this.fields = this.fields.concat([
+ '`tabJournal Voucher`.voucher_type',
+ '`tabJournal Voucher`.remark',
+ '`tabJournal Voucher`.total_debit'
+ ]);
+ this.stats = this.stats.concat(['voucher_type']);
+ },
+ prepare_data: function(data) {
+ this._super(data);
+ if(!data.remark) data.remark = '';
+ if(data.remark.length> 30) {
+ data.remark = '<span title="'+data.remark+'">' + data.remark.substr(0,30)
+ + '...</span>';
+ }
+ },
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '12%', content:'name'},
+ {width: '15%', content:'voucher_type'},
+ {width: '38%', content:'tags+remark', css: {'color':'#aaa'}},
+ {
+ width: '18%',
+ content: function(parent, data) {
+ $(parent).html(sys_defaults.currency + ' ' + fmt_money(data.total_debit))
+ },
+ css: {'text-align':'right'}
+ },
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ],
+});
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
index 99bd24c..2715bfd 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
@@ -17,8 +17,8 @@
cur_frm.cscript.tname = "PV Detail";
cur_frm.cscript.fname = "entries";
cur_frm.cscript.other_fname = "purchase_tax_details";
-$import(Purchase Other Charges)
-$import(Purchase Common)
+wn.require('erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js');
+wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
// On Load
// --------
@@ -162,7 +162,7 @@
// Recalculate Button
// -------------------
-cur_frm.cscript['Recalculate'] = function(doc, dt, dn) {
+cur_frm.cscript['Recalculate'] = function(doc, cdt, cdn) {
cur_frm.cscript['Calculate Tax'](doc,cdt,cdn);
calc_total_advance(doc,cdt,cdn);
}
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
index 1a09a45..d930583 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
@@ -123,7 +123,10 @@
def get_pv_details(self, arg):
import json
- item_det = sql("select item_name, brand, description, item_group,purchase_account,cost_center from tabItem where name=%s",arg,as_dict=1)
+ item_det = sql("select item_name, brand, description, item_group,purchase_account,cost_center, last_purchase_rate from tabItem where name=%s",arg,as_dict=1)
+ lpr = item_det and flt(item_det[0]['last_purchase_rate']) or 0
+ import_lpr = lpr / flt(self.doc.conversion_rate) or 1
+
tax = sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , arg)
t = {}
for x in tax: t[x[0]] = flt(x[1])
@@ -132,13 +135,17 @@
'brand' : item_det and item_det[0]['brand'] or '',
'description' : item_det and item_det[0]['description'] or '',
'item_group' : item_det and item_det[0]['item_group'] or '',
- 'rate' : 0.00,
+ 'rate' : lpr,
+ 'purchase_ref_rate' : lpr,
+ 'import_ref_rate' : import_lpr,
+ 'import_rate' : import_lpr,
'qty' : 0.00,
'amount' : 0.00,
'expense_head' : item_det and item_det[0]['purchase_account'] or '',
'cost_center' : item_det and item_det[0]['cost_center'] or '',
'item_tax_rate' : json.dumps(t)
}
+
return ret
diff --git a/erpnext/accounts/doctype/receivable_voucher/listview.js b/erpnext/accounts/doctype/receivable_voucher/listview.js
new file mode 100644
index 0000000..d30431f
--- /dev/null
+++ b/erpnext/accounts/doctype/receivable_voucher/listview.js
@@ -0,0 +1,32 @@
+// render
+wn.doclistviews['Receivable Voucher'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabReceivable Voucher`.customer",
+ "ifnull(`tabReceivable Voucher`.outstanding_amount,0) as outstanding_amount",
+ "ifnull(`tabReceivable Voucher`.grand_total,0) as grand_total",
+ "`tabReceivable Voucher`.currency",
+ "ifnull(`tabReceivable Voucher`.grand_total_export,0) as grand_total_export"
+ ]);
+ },
+ prepare_data: function(data) {
+ this._super(data);
+ data.paid = flt((data.grand_total - data.outstanding_amount) / data.grand_total * 100, 2);
+ },
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '15%', content:'name'},
+ {width: '37%', content:'tags+customer', css: {color:'#aaa'}},
+ {
+ width: '18%',
+ content: function(parent, data) {
+ $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
+ },
+ css: {'text-align':'right'}
+ },
+ {width: '10%', content: 'paid', type:'bar-graph', label:'Paid'},
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+});
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
index 391bbcd..6db3b52 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
@@ -22,9 +22,10 @@
// print heading
cur_frm.pformat.print_heading = 'Invoice';
-$import(Sales Common)
-$import(Other Charges)
-$import(SMS Control)
+wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
+wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
// On Load
// -------
@@ -162,14 +163,24 @@
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
var callback = function(r,rt) {
+ var callback2 = function(doc, dt, dn) {
+ doc = locals[dt][dn];
+ if(doc.debit_to && doc.posting_date){
+ get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,
+ function(doc, dt, dn) {
+ cur_frm.refresh();
+ });
+
+ }
+ }
var doc = locals[cur_frm.doctype][cur_frm.docname];
- get_server_fields('get_debit_to','','',doc, dt, dn, 0);
- cur_frm.refresh();
+ get_server_fields('get_debit_to','','',doc, dt, dn, 0, callback2);
}
var args = onload ? 'onload':''
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+
}
@@ -476,7 +487,6 @@
}
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Sales Invoice',
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.html b/erpnext/accounts/page/accounts_browser/accounts_browser.html
index 8614f2c..8cfde8a 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.html
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.html
@@ -1,4 +1,4 @@
<div class="layout_wrapper">
<div id="ab_header"></div>
-<div id="ab_body" style="margin: 16px"></div>
+<div id="ab_body" style="margin: 16px;"></div>
</div>
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 60c168d..49cbcb3 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -46,7 +46,7 @@
//================== table body======================================
var ac_main_grid = make_table($i('ab_body'),1,2,'100%',['60%','40%'],{border:"0px", padding:"4px",tableLayout: "fixed", borderCollapse: "collapse"});
$y($td(ac_main_grid,0,0),{border: "1px solid #dddddd", padding: "8px"});
- pscript.account_tree = $a($td(ac_main_grid,0,0),'div');
+ pscript.account_tree = $a($td(ac_main_grid,0,0),'div', '',{minHeight:'400px'});
$y($td(ac_main_grid,0,1),{border: "1px solid #DDD"});
pscript.la = $a($td(ac_main_grid,0,1),'div');
pscript.acc_period_bal = $a($td(ac_main_grid,0,1),'div');
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
index f951388..af49c81 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql
@@ -1,5 +1,5 @@
SELECT gl.account,sum(gl.credit) as amount
FROM `tabGL Entry` gl, `tabAccount` a
-WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s'
+WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' and ifnull(gl.is_cancelled, 'No') = 'No'
GROUP BY gl.account
ORDER BY posting_date
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
index 34a828a..d9f00d1 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
@@ -114,8 +114,8 @@
r.append(flt(opening<0 and -opening or 0))
r.append(flt(debit))
r.append(flt(credit))
- r.append(flt(closing>0 and closing or 0))
- r.append(flt(closing<0 and -closing or 0))
+ r.append(flt(closing>0.01 and closing or 0))
+ r.append(flt(closing<-0.01 and -closing or 0))
out =[]
diff --git a/erpnext/buying/Module Def/Buying/Buying.txt b/erpnext/buying/Module Def/Buying/Buying.txt
deleted file mode 100644
index 16cae81..0000000
--- a/erpnext/buying/Module Def/Buying/Buying.txt
+++ /dev/null
@@ -1,155 +0,0 @@
-# Module Def, Buying
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:40:38',
- 'docstatus': 0,
- 'modified': '2012-01-10 17:52:19',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Buying',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Buying',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'doctype_list': 'DocType Mapper, Purchase Receipt-Payable Voucher\nDocType Mapper, Purchase Order-Payable Voucher\nDocType Mapper, Purchase Order-Purchase Receipt\nDocType Mapper, Indent-Purchase Order\nPrint Format, Purchase Order Format\nPrint Format, Purchase Receipt Format\nDocType Label, Indent',
- 'file_list': 'scm.gif,FileData/00209',
- 'is_hidden': 'No',
- 'module_desc': '<p>All details about your Suppliers and past transactions</p>',
- 'module_icon': 'Buying.gif',
- 'module_label': 'Buying',
- 'module_name': 'Buying',
- 'module_seq': 4,
- 'name': '__common__'
- },
-
- # Module Def, Buying
- {
- 'doctype': u'Module Def',
- 'name': 'Buying'
- },
-
- # Module Def Item
- {
- 'description': 'Your Supplier Database',
- 'display_name': 'Supplier',
- 'doc_name': 'Supplier',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'id\nsupplier_type\nsupplier_status\ncompany'
- },
-
- # Module Def Item
- {
- 'description': 'Buy requests from various people in your company',
- 'display_name': 'Indent',
- 'doc_name': 'Indent',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\nsales_order_no\nremark'
- },
-
- # Module Def Item
- {
- 'description': 'Orders you have placed to your suppliers',
- 'display_name': 'Purchase Order',
- 'doc_name': 'Purchase Order',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nsupplier\ntransaction_date\ngrand_total'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Receipt Details',
- 'doc_name': 'Purchase Receipt Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Purchase in Transit',
- 'doc_name': 'PV Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending PO Items To Receive',
- 'doc_name': 'PO Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Pending PO Items To Bill',
- 'doc_name': 'PO Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Purchase Details',
- 'doc_name': 'PO Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Ledger details of your creditors',
- 'display_name': "Creditor's Ledger",
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item',
- 'icon': 'accept.gif'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Purchase User'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Purchase Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Administrator'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Purchase Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/buying/doctype/indent/indent.js b/erpnext/buying/doctype/indent/indent.js
index 570e06c..1940e5a 100644
--- a/erpnext/buying/doctype/indent/indent.js
+++ b/erpnext/buying/doctype/indent/indent.js
@@ -17,8 +17,8 @@
cur_frm.cscript.tname = "Indent Detail";
cur_frm.cscript.fname = "indent_details";
-$import(Purchase Common)
-$import(SMS Control)
+wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
cur_frm.cscript.indent_doctype_label = get_doctype_label('Indent');
//========================== On Load =================================================
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index f0f24a0..4ac3fdf 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -393,12 +393,12 @@
refresh_field('net_total');
refresh_field('net_total_import');
- cur_frm.cscript.val_cal_charges(doc, cdt, cdn, tname, fname, other_fname);
+ cur_frm.cscript.val_cal_charges(doc, tname, fname, other_fname);
}
//======== Function was broken away from cur_frm.cscript.calc_amount as PV has fieldname 'rate' instead of 'purchase_rate'===========
-cur_frm.cscript.val_cal_charges = function(doc, cdt, cdn, tname, fname, other_fname){
+cur_frm.cscript.val_cal_charges = function(doc, tname, fname, other_fname){
doc = locals[doc.doctype][doc.name]
if(flt(doc.net_total) > 0) {
@@ -416,7 +416,7 @@
}
cur_frm.cscript.calc_other_charges(doc , tname , fname , other_fname); // calculate other charges
}
- cur_frm.cscript.calc_doc_values(doc, cdt, cdn, tname, fname, other_fname); // calculates total amounts
+ cur_frm.cscript.calc_doc_values(doc, tname, fname, other_fname); // calculates total amounts
refresh_many(['net_total', 'grand_total', 'rounded_total', 'grand_total_import', 'rounded_total_import', 'in_words', 'in_words_import', 'purchase_tax_details', 'total_tax', 'other_charges_added', 'other_charges_deducted', 'net_total_import', 'other_charges_added_import', 'other_charges_deducted_import']);
@@ -545,9 +545,10 @@
// ******* Calculation of total amounts of document (item amount + other charges)****************
-cur_frm.cscript.calc_doc_values = function(doc, cdt, cdn, tname, fname, other_fname) {
+cur_frm.cscript.calc_doc_values = function(doc, tname, fname, other_fname) {
doc = locals[doc.doctype][doc.name];
- var net_total = 0; var total_tax = 0; var other_charges_added = 0; var other_charges_deducted = 0;
+ var net_total = 0; var total_tax = 0; var other_charges_added = 0;
+ var other_charges_deducted = 0;
var cl = getchildren(tname, doc.name, fname);
for(var i = 0; i<cl.length; i++){
net_total += flt(cl[i].amount);
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 7af1204..3588a52 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -17,9 +17,11 @@
cur_frm.cscript.tname = "PO Detail";
cur_frm.cscript.fname = "po_details";
cur_frm.cscript.other_fname = "purchase_tax_details";
-$import(Purchase Common)
-$import(Purchase Other Charges)
-$import(SMS Control)
+
+wn.require('erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js');
+wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
//========================== On Load =================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
@@ -270,7 +272,6 @@
return out;
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Purchase Order',
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 41889af..ebf3593 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-$import(Contact Control)
+wn.require('erpnext/setup/doctype/contact_control/contact_control.js');
cur_frm.cscript.onload = function(doc,dt,dn){
@@ -54,19 +54,10 @@
cur_frm.cscript.make_address = function() {
if(!cur_frm.address_list) {
- cur_frm.address_list = new wn.widgets.Listing({
+ cur_frm.address_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Address HTML'].wrapper,
page_length: 2,
new_doctype: "Address",
- new_doc_onload: function(dn) {
- ndoc = locals["Address"][dn];
- ndoc.supplier = cur_frm.doc.name;
- ndoc.supplier_name = cur_frm.doc.supplier_name;
- ndoc.address_type = 'Office';
- },
- new_doc_onsave: function(dn) {
- cur_frm.address_list.run()
- },
get_query: function() {
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
@@ -96,18 +87,10 @@
cur_frm.cscript.make_contact = function() {
if(!cur_frm.contact_list) {
- cur_frm.contact_list = new wn.widgets.Listing({
+ cur_frm.contact_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Contact HTML'].wrapper,
page_length: 2,
new_doctype: "Contact",
- new_doc_onload: function(dn) {
- ndoc = locals["Contact"][dn];
- ndoc.supplier = cur_frm.doc.name;
- ndoc.supplier_name = cur_frm.doc.supplier_name;
- },
- new_doc_onsave: function(dn) {
- cur_frm.contact_list.run()
- },
get_query: function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
@@ -128,6 +111,7 @@
// make purchase order list
cur_frm.cscript.make_po_list = function(parent, doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
var lst = new Listing();
lst.colwidths = ['5%','25%','20%','25%','25%'];
lst.colnames = ['Sr.','Id','Status','PO Date','Grand Total'];
@@ -142,6 +126,7 @@
// make purchase receipt list
cur_frm.cscript.make_pr_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','20%','15%','20%'];
lst.colnames = ['Sr.','Id','Status','Receipt Date','% Billed','Grand Total'];
@@ -156,6 +141,7 @@
// make purchase invoice list
cur_frm.cscript.make_pi_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','20%','15%','20%'];
lst.colnames = ['Sr.','Id','Posting Date','Credit To','Bill Date','Grand Total'];
diff --git a/erpnext/home/page/activity/activity.js b/erpnext/home/page/activity/activity.js
index 62604b7..83f018d 100644
--- a/erpnext/home/page/activity/activity.js
+++ b/erpnext/home/page/activity/activity.js
@@ -1,5 +1,5 @@
wn.pages['activity'].onload = function(wrapper) {
- var list = new wn.widgets.Listing({
+ var list = new wn.ui.Listing({
method: 'home.page.activity.activity.get_feed',
parent: $('#activity-list'),
render_row: function(row, data) {
diff --git a/erpnext/home/page/dashboard/dashboard.js b/erpnext/home/page/dashboard/dashboard.js
index 1d01ee9..072af25 100644
--- a/erpnext/home/page/dashboard/dashboard.js
+++ b/erpnext/home/page/dashboard/dashboard.js
@@ -16,12 +16,12 @@
pscript.onload_dashboard = function() {
// load jqplot
- wn.require('lib/css/jqplot.css');
- wn.require('lib/js/legacy/jquery/jquery.jqplot.min.js');
- wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.barRenderer.js');
- wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
- wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.canvasTextRenderer.min.js');
- wn.require('lib/js/legacy/jquery/jqplot-plugins/jqplot.categoryAxisRenderer.min.js');
+ wn.require('lib/css/lib/jqplot.css');
+ wn.require('lib/js/lib/jqplot/jquery.jqplot.min.js');
+ wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.barRenderer.js');
+ wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.canvasAxisTickRenderer.min.js');
+ wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.canvasTextRenderer.min.js');
+ wn.require('lib/js/lib/jqplot/jqplot-plugins/jqplot.categoryAxisRenderer.min.js');
pscript.dashboard_settings = {
diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css
index cc6126e..59e50eb 100644
--- a/erpnext/home/page/desktop/desktop.css
+++ b/erpnext/home/page/desktop/desktop.css
@@ -46,10 +46,10 @@
width: 56px;
height: 56px;
border: 4px solid white;
- box-shadow: 0 0 10px 1px black;
- -moz-box-shadow: 0 0 10px 1px black;
- -webkit-box-shadow: 0 0 10px 1px black;
- -o-box-shadow: 0 0 10px 1px black;
+ box-shadow: 0 0 4px 1px black;
+ -moz-box-shadow: 0 0 4px 1px black;
+ -webkit-box-shadow: 0 0 4px 1px black;
+ -o-box-shadow: 0 0 4px 1px black;
margin: auto;
}
@@ -62,17 +62,16 @@
.case-label {
color: white;
- /*font-size: 12px;*/
padding-top: 10px;
text-align: center;
- text-shadow: 1px 1px 5px #000, 3px 3px 5px #000;
+ text-shadow: 1px 1px 2px #000, 1px 1px 2px #000, 1px 1px 2px #000, 0px 0px 2px #000;
}
/* Hover and click effects */
.case-border:hover, .circle:hover, .hover-effect {
- box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
- -moz-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
- -webkit-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
+ box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
+ -moz-box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
+ -webkit-box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
-o-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
}
@@ -105,10 +104,10 @@
margin-top: -74px;
margin-right: 10px;
border: 2px solid white;
- box-shadow: 0 0 10px 1px black;
- -moz-box-shadow: 0 0 10px 1px black;
- -webkit-box-shadow: 0 0 10px 1px black;
- -o-box-shadow: 0 0 10px 1px black;
+ box-shadow: 0 0 4px 1px black;
+ -moz-box-shadow: 0 0 4px 1px black;
+ -webkit-box-shadow: 0 0 4px 1px black;
+ -o-box-shadow: 0 0 4px 1px black;
}
.circle-text {
diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js
index b2825f3..797d8e9 100644
--- a/erpnext/home/page/event_updates/event_updates.js
+++ b/erpnext/home/page/event_updates/event_updates.js
@@ -470,7 +470,7 @@
var me = this;
this.list_area = $a(this.wrapper,'div')
- this.list = new wn.widgets.Listing({
+ this.list = new wn.ui.Listing({
parent: this.list_area,
query: repl('select \
distinct t1.name, t1.feed_type, t1.doc_type, t1.doc_name, t1.subject, t1.modified_by, \
@@ -600,7 +600,7 @@
// get values
$c_page('home', 'event_updates', 'get_status_details', user,
function(r,rt) {
- //page_body.wntoolbar.set_new_comments(r.message.unread_messages);
+ //wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
// render online users
pscript.online_users_obj.render(r.message.online_users);
diff --git a/erpnext/home/page/my_company/my_company.js b/erpnext/home/page/my_company/my_company.js
index 8217cc7..7b198df 100644
--- a/erpnext/home/page/my_company/my_company.js
+++ b/erpnext/home/page/my_company/my_company.js
@@ -179,7 +179,7 @@
var me = this;
this.lst_area = $a(this.list_wrapper, 'div');
- this.lst = new wn.widgets.Listing({
+ this.lst = new wn.ui.Listing({
parent: this.lst_area,
as_dict: 1,
get_query: function() {
@@ -692,7 +692,7 @@
this.my_messages_box = $a(this.lst_area, 'div', 'my-company-conversation-head', {marginBottom:'7px'}, 'Messages by everyone to me<br>To send a message, click on the user on the left')
}
- this.lst = new wn.widgets.Listing({
+ this.lst = new wn.ui.Listing({
parent: this.lst_area,
as_dict: 1,
no_result_message: (user==uid
diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.js b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
index 2e03567..2363dbd 100644
--- a/erpnext/hr/doctype/expense_voucher/expense_voucher.js
+++ b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
@@ -100,7 +100,7 @@
cur_frm.cscript.calculate_total(doc,cdt,cdn);
}
-$import(Notification Control);
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
cur_frm.cscript['Approve'] = function(doc,cdt,cdn){
@@ -244,7 +244,6 @@
});
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Expense Voucher',
diff --git a/erpnext/knowledge_base/page/question_view/question_view.js b/erpnext/knowledge_base/page/question_view/question_view.js
index 5783471..a193f16 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.js
+++ b/erpnext/knowledge_base/page/question_view/question_view.js
@@ -131,7 +131,7 @@
this.make_list = function() {
- this.list = new wn.widgets.Listing({
+ this.list = new wn.ui.Listing({
parent: me.parent,
as_dict: 1,
no_result_message: 'No answers yet, be the first one to answer!',
@@ -185,4 +185,4 @@
}
-$import(knowledge_base/page/kb_common/kb_common.js);
\ No newline at end of file
+wn.require('erpnext/knowledge_base/page/kb_common/kb_common.js');
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/questions/questions.js b/erpnext/knowledge_base/page/questions/questions.js
index 7261cd8..6b0ca25 100644
--- a/erpnext/knowledge_base/page/questions/questions.js
+++ b/erpnext/knowledge_base/page/questions/questions.js
@@ -107,7 +107,7 @@
this.list_area = $a(w, 'div', '', {marginRight:'13px'})
this.no_result = $a(w, 'div','help_box',{display:'none'},'No questions asked yet! Be the first one to ask')
- this.list = new wn.widgets.Listing({
+ this.list = new wn.ui.Listing({
parent: this.list_area,
no_results_message: 'No questions found. Ask a new question!',
as_dict: 1,
@@ -215,4 +215,4 @@
this.make()
}
-$import(knowledge_base/page/kb_common/kb_common.js);
\ No newline at end of file
+wn.require('erpnext/knowledge_base/page/kb_common/kb_common.js');
\ No newline at end of file
diff --git a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
index 8fee8c5..9f0a5c0 100644
--- a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
+++ b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('accounts', 'doctype', 'pv_detail')
reload_doc('buying', 'doctype', 'po_detail')
diff --git a/erpnext/patches/before_jan_2012/accounts_default_form.py b/erpnext/patches/before_jan_2012/accounts_default_form.py
index 282ebf5..eb8f586 100644
--- a/erpnext/patches/before_jan_2012/accounts_default_form.py
+++ b/erpnext/patches/before_jan_2012/accounts_default_form.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup', 'doctype', 'company')
reload_doc('setup', 'doctype', 'manage_account')
diff --git a/erpnext/patches/before_jan_2012/auto_indent.py b/erpnext/patches/before_jan_2012/auto_indent.py
index 7373c39..a472d80 100644
--- a/erpnext/patches/before_jan_2012/auto_indent.py
+++ b/erpnext/patches/before_jan_2012/auto_indent.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup', 'doctype', 'manage_account')
reload_doc('stock', 'doctype', 'item')
webnotes.conn.sql("delete from `tabDocField` where fieldname='minimum_inventory_level' and parent='item'")
diff --git a/erpnext/patches/before_jan_2012/c_form_patch.py b/erpnext/patches/before_jan_2012/c_form_patch.py
index 8c00891..307dabc 100644
--- a/erpnext/patches/before_jan_2012/c_form_patch.py
+++ b/erpnext/patches/before_jan_2012/c_form_patch.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('accounts', 'doctype', 'receivable_voucher')
reload_doc('accounts', 'doctype', 'c_form')
diff --git a/erpnext/patches/before_jan_2012/deploy_email_digest.py b/erpnext/patches/before_jan_2012/deploy_email_digest.py
index 5adeb97..8474b64 100644
--- a/erpnext/patches/before_jan_2012/deploy_email_digest.py
+++ b/erpnext/patches/before_jan_2012/deploy_email_digest.py
@@ -21,7 +21,7 @@
* Reload email_digest doctype
* Create default email digest
"""
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
# Minor fix in print_format doctype
#reload_doc('core', 'doctype', 'print_format')
diff --git a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
index bab119e..83f2143 100644
--- a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
@@ -22,7 +22,7 @@
"""
def execute():
from webnotes.model.doc import Document
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('hr', 'search_criteria', 'employeewise_balance_leave_report')
d = Document('Search Criteria', 'employeewise_balance_leave_report')
d.criteria_name = 'Employee Leave Balance Report'
diff --git a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
index aab64a0..a9dcd75 100644
--- a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
+++ b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
@@ -19,7 +19,7 @@
import webnotes
from webnotes.model import delete_doc
-from webnotes.modules.module_manager import reload_doc
+from webnotes.modules import reload_doc
from webnotes.modules.export_module import export_to_files
sql = webnotes.conn.sql
diff --git a/erpnext/patches/before_jan_2012/install_print_formats.py b/erpnext/patches/before_jan_2012/install_print_formats.py
index 3a18aae..ab0067c 100644
--- a/erpnext/patches/before_jan_2012/install_print_formats.py
+++ b/erpnext/patches/before_jan_2012/install_print_formats.py
@@ -68,7 +68,7 @@
"""
Install print formats
"""
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('core', 'doctype', 'print_format')
#copy_doctype_to_pfs()
diff --git a/erpnext/patches/before_jan_2012/lcw_patch.py b/erpnext/patches/before_jan_2012/lcw_patch.py
index b274069..27e9a56 100644
--- a/erpnext/patches/before_jan_2012/lcw_patch.py
+++ b/erpnext/patches/before_jan_2012/lcw_patch.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'landed_cost_wizard')
diff --git a/erpnext/patches/before_jan_2012/packing_slip.py b/erpnext/patches/before_jan_2012/packing_slip.py
index 23c34d9d..7fe2d5d 100644
--- a/erpnext/patches/before_jan_2012/packing_slip.py
+++ b/erpnext/patches/before_jan_2012/packing_slip.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'delivery_note_detail')
reload_doc('stock', 'Print Format', 'Delivery Note Packing List Wise')
diff --git a/erpnext/patches/before_jan_2012/price_list_patch.py b/erpnext/patches/before_jan_2012/price_list_patch.py
index ce2ff4a..6cd3f9b 100644
--- a/erpnext/patches/before_jan_2012/price_list_patch.py
+++ b/erpnext/patches/before_jan_2012/price_list_patch.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('accounts', 'doctype', 'receivable_voucher')
reload_doc('stock', 'doctype', 'delivery_note')
diff --git a/erpnext/patches/before_jan_2012/project_patch.py b/erpnext/patches/before_jan_2012/project_patch.py
index f4b0ea6..df0e1e9 100644
--- a/erpnext/patches/before_jan_2012/project_patch.py
+++ b/erpnext/patches/before_jan_2012/project_patch.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
sql = webnotes.conn.sql
# Reload item table
diff --git a/erpnext/patches/before_jan_2012/reload_address.py b/erpnext/patches/before_jan_2012/reload_address.py
index 3ef80d8..ae68f6f 100644
--- a/erpnext/patches/before_jan_2012/reload_address.py
+++ b/erpnext/patches/before_jan_2012/reload_address.py
@@ -16,6 +16,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('utilities', 'doctype', 'address')
diff --git a/erpnext/patches/before_jan_2012/reload_bom.py b/erpnext/patches/before_jan_2012/reload_bom.py
index f925bc6..cbacce1 100644
--- a/erpnext/patches/before_jan_2012/reload_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_bom.py
@@ -16,6 +16,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('production', 'doctype', 'bill_of_materials')
diff --git a/erpnext/patches/before_jan_2012/reload_doclayer.py b/erpnext/patches/before_jan_2012/reload_doclayer.py
index 4ab077e..2c6e23e 100644
--- a/erpnext/patches/before_jan_2012/reload_doclayer.py
+++ b/erpnext/patches/before_jan_2012/reload_doclayer.py
@@ -18,7 +18,7 @@
Reload DocLayer, DocLayerField and Print Format doctypes
"""
def execute():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('core', 'doctype', 'print_format')
reload_doc('core', 'doctype', 'doclayer')
reload_doc('core', 'doctype', 'doclayerfield')
diff --git a/erpnext/patches/before_jan_2012/reload_email_digest.py b/erpnext/patches/before_jan_2012/reload_email_digest.py
index 13a2614..15cbfc3 100644
--- a/erpnext/patches/before_jan_2012/reload_email_digest.py
+++ b/erpnext/patches/before_jan_2012/reload_email_digest.py
@@ -15,5 +15,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
def execute():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('Setup', 'DocType', 'Email Digest')
diff --git a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
index b60d3d4..53183cb 100644
--- a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
@@ -16,5 +16,5 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('hr', 'search_criteria', 'employeewise_balance_leave_report')
diff --git a/erpnext/patches/before_jan_2012/reload_flat_bom.py b/erpnext/patches/before_jan_2012/reload_flat_bom.py
index a46ad5e..020bd7e 100644
--- a/erpnext/patches/before_jan_2012/reload_flat_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_flat_bom.py
@@ -16,7 +16,7 @@
def execute():
from webnotes.modules import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('production', 'doctype', 'flat_bom_detail')
reload_doc('production', 'doctype', 'bom_material')
diff --git a/erpnext/patches/before_jan_2012/reload_gl_mapper.py b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
index 27f2c58..c43ab67 100644
--- a/erpnext/patches/before_jan_2012/reload_gl_mapper.py
+++ b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
# reload jv gl mapper
reload_doc('accounts', 'GL Mapper', 'Journal Voucher')
diff --git a/erpnext/patches/before_jan_2012/reload_lc_wizard.py b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
index 7645419..e3df031 100644
--- a/erpnext/patches/before_jan_2012/reload_lc_wizard.py
+++ b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
from webnotes.model import delete_doc
delete_doc('DocType', 'Landed Cost Wizard')
diff --git a/erpnext/patches/before_jan_2012/reload_print_format.py b/erpnext/patches/before_jan_2012/reload_print_format.py
index 37b83a6..9948beb 100644
--- a/erpnext/patches/before_jan_2012/reload_print_format.py
+++ b/erpnext/patches/before_jan_2012/reload_print_format.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
from webnotes.model.doc import addchild
from webnotes.model.code import get_obj
reload_doc('stock', 'Print Format', 'Delivery Note Packing List Wise')
diff --git a/erpnext/patches/before_jan_2012/reload_project_task.py b/erpnext/patches/before_jan_2012/reload_project_task.py
index 14d39fd..f174603 100644
--- a/erpnext/patches/before_jan_2012/reload_project_task.py
+++ b/erpnext/patches/before_jan_2012/reload_project_task.py
@@ -18,6 +18,6 @@
Reload Task Doctype of Project Module
"""
def execute():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('Projects', 'DocType', 'Ticket')
diff --git a/erpnext/patches/before_jan_2012/reload_reco.py b/erpnext/patches/before_jan_2012/reload_reco.py
index 9335992..782fc7f 100644
--- a/erpnext/patches/before_jan_2012/reload_reco.py
+++ b/erpnext/patches/before_jan_2012/reload_reco.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'stock_reconciliation')
webnotes.conn.sql("delete from `tabDocField` where (label in ('Validate Data', 'Attachment HTML', 'Attachment') or fieldname in ('next_step', 'company', 'fiscal_year', 'amendment_date')) and parent = 'Stock Reconciliation'")
diff --git a/erpnext/patches/before_jan_2012/reload_rv.py b/erpnext/patches/before_jan_2012/reload_rv.py
index f41db49..4365563 100644
--- a/erpnext/patches/before_jan_2012/reload_rv.py
+++ b/erpnext/patches/before_jan_2012/reload_rv.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
from webnotes.model.code import get_obj
reload_doc('accounts', 'doctype', 'receivable_voucher')
diff --git a/erpnext/patches/before_jan_2012/reload_support_ticket.py b/erpnext/patches/before_jan_2012/reload_support_ticket.py
index 803754f..f889687 100644
--- a/erpnext/patches/before_jan_2012/reload_support_ticket.py
+++ b/erpnext/patches/before_jan_2012/reload_support_ticket.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('Support', 'DocType', 'Support Ticket')
from webnotes.model.code import get_obj
get_obj('DocType', 'Support Ticket').validate()
diff --git a/erpnext/patches/before_jan_2012/sal_man_patch.py b/erpnext/patches/before_jan_2012/sal_man_patch.py
index b8f5301..626d2e3 100644
--- a/erpnext/patches/before_jan_2012/sal_man_patch.py
+++ b/erpnext/patches/before_jan_2012/sal_man_patch.py
@@ -17,7 +17,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
sql = webnotes.conn.sql
reload_doc('hr', 'doctype', 'salary_manager')
diff --git a/erpnext/patches/before_jan_2012/task_email_notification.py b/erpnext/patches/before_jan_2012/task_email_notification.py
index 8d1a078..9f7669a 100644
--- a/erpnext/patches/before_jan_2012/task_email_notification.py
+++ b/erpnext/patches/before_jan_2012/task_email_notification.py
@@ -16,5 +16,5 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('projects', 'doctype', 'ticket')
diff --git a/erpnext/patches/jan_mar_2012/allocated_to_profile.py b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
index 32c7a2c..ef0ee97 100644
--- a/erpnext/patches/jan_mar_2012/allocated_to_profile.py
+++ b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
@@ -32,5 +32,5 @@
AND label='Make Maintenance Visit'
""")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('support', 'doctype', 'customer_issue')
diff --git a/erpnext/patches/jan_mar_2012/apps/todo_item.py b/erpnext/patches/jan_mar_2012/apps/todo_item.py
index 6eec6fd..bbef232 100644
--- a/erpnext/patches/jan_mar_2012/apps/todo_item.py
+++ b/erpnext/patches/jan_mar_2012/apps/todo_item.py
@@ -18,5 +18,5 @@
"""
* Reload ToDo Item
"""
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('utilities', 'doctype', 'todo_item')
diff --git a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
index 4671143..32a2125 100644
--- a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
+++ b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
@@ -26,7 +26,7 @@
patch_primary_address()
def reload_sc():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'customer_address_contact')
reload_doc('selling', 'Module Def', 'Selling')
diff --git a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
index 7a28ef8..653ff58 100644
--- a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
+++ b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import webnotes
-from webnotes.modules.module_manager import reload_doc
+from webnotes.modules import reload_doc
def execute():
delete_fields_dn_detail()
diff --git a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
index a6f7a7c..0b6f405 100644
--- a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
+++ b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
@@ -24,5 +24,5 @@
UPDATE `tabDocField` SET options=NULL
WHERE parent='DocLayer' AND fieldname='doc_type'
""")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('core', 'doctype', 'doclayer')
diff --git a/erpnext/patches/jan_mar_2012/dt_map_fix.py b/erpnext/patches/jan_mar_2012/dt_map_fix.py
index f669009..37732df 100644
--- a/erpnext/patches/jan_mar_2012/dt_map_fix.py
+++ b/erpnext/patches/jan_mar_2012/dt_map_fix.py
@@ -1,6 +1,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
webnotes.conn.sql("delete from `tabField Mapper Detail` where from_field = 'transaction_date' and parent in ('Sales Order-Delivery Note', 'Purchase Order-Purchase Receipt')")
reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note')
diff --git a/erpnext/patches/jan_mar_2012/email_settings_reload.py b/erpnext/patches/jan_mar_2012/email_settings_reload.py
index ec6f05d..85c683e 100644
--- a/erpnext/patches/jan_mar_2012/email_settings_reload.py
+++ b/erpnext/patches/jan_mar_2012/email_settings_reload.py
@@ -25,5 +25,5 @@
WHERE parent = 'Email Settings' AND fieldname = 'mail_port'
""")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup', 'doctype', 'email_settings')
diff --git a/erpnext/patches/jan_mar_2012/jan_production_patches.py b/erpnext/patches/jan_mar_2012/jan_production_patches.py
index d57fb9e..479cecb 100644
--- a/erpnext/patches/jan_mar_2012/jan_production_patches.py
+++ b/erpnext/patches/jan_mar_2012/jan_production_patches.py
@@ -20,7 +20,7 @@
Patch includes:
* Reload of Stock Entry Detail
"""
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'stock_entry_detail')
reload_doc('stock', 'doctype', 'item_supplier')
diff --git a/erpnext/patches/jan_mar_2012/label_cleanup.py b/erpnext/patches/jan_mar_2012/label_cleanup.py
index b40f36f..f158495 100644
--- a/erpnext/patches/jan_mar_2012/label_cleanup.py
+++ b/erpnext/patches/jan_mar_2012/label_cleanup.py
@@ -1,7 +1,7 @@
def execute():
import webnotes
from webnotes.model import delete_doc
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
dt = {
'selling': ['quotation', 'sales_order', 'quotation_detail', 'sales_order_detail'],
diff --git a/erpnext/patches/jan_mar_2012/pending_patches.py b/erpnext/patches/jan_mar_2012/pending_patches.py
index 351200f..821a411 100644
--- a/erpnext/patches/jan_mar_2012/pending_patches.py
+++ b/erpnext/patches/jan_mar_2012/pending_patches.py
@@ -17,7 +17,7 @@
def execute():
import webnotes
from webnotes.model.code import get_obj
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
sql = webnotes.conn.sql
reload_doc('hr', 'doctype', 'appraisal')
diff --git a/erpnext/patches/jan_mar_2012/production_cleanup.py b/erpnext/patches/jan_mar_2012/production_cleanup.py
index d0a5879..e715f27 100644
--- a/erpnext/patches/jan_mar_2012/production_cleanup.py
+++ b/erpnext/patches/jan_mar_2012/production_cleanup.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
from webnotes.model import delete_doc
sql = webnotes.conn.sql
diff --git a/erpnext/patches/jan_mar_2012/reload_doctype.py b/erpnext/patches/jan_mar_2012/reload_doctype.py
index 51241b8..957864b 100644
--- a/erpnext/patches/jan_mar_2012/reload_doctype.py
+++ b/erpnext/patches/jan_mar_2012/reload_doctype.py
@@ -16,5 +16,5 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('core', 'doctype', 'doctype')
diff --git a/erpnext/patches/jan_mar_2012/reload_item.py b/erpnext/patches/jan_mar_2012/reload_item.py
index c45b818..e42b50b 100644
--- a/erpnext/patches/jan_mar_2012/reload_item.py
+++ b/erpnext/patches/jan_mar_2012/reload_item.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'item')
webnotes.conn.sql("update `tabItem` set re_order_qty = min_order_qty")
diff --git a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
index 4ed252b..5866429 100644
--- a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
+++ b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
@@ -16,5 +16,5 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'DocType Mapper', 'Purchase Order-Purchase Receipt')
diff --git a/erpnext/patches/jan_mar_2012/reload_quote.py b/erpnext/patches/jan_mar_2012/reload_quote.py
new file mode 100644
index 0000000..5715bb4
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/reload_quote.py
@@ -0,0 +1,4 @@
+def execute():
+ import webnotes
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('selling', 'doctype', 'quotation')
diff --git a/erpnext/patches/jan_mar_2012/reload_table.py b/erpnext/patches/jan_mar_2012/reload_table.py
index 481b46f..28a597b 100644
--- a/erpnext/patches/jan_mar_2012/reload_table.py
+++ b/erpnext/patches/jan_mar_2012/reload_table.py
@@ -1,6 +1,6 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('selling', 'doctype', 'quotation_detail')
reload_doc('selling', 'doctype', 'sales_order_detail')
reload_doc('stock', 'doctype', 'delivery_note_detail')
diff --git a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
index fe804c0..8549e0d 100644
--- a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
+++ b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
@@ -26,5 +26,5 @@
AND fieldtype='Button'
""")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('accounts', 'doctype', 'journal_voucher')
diff --git a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
index 01aeebf..4e026f7 100644
--- a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
+++ b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
@@ -47,7 +47,7 @@
* purchase_order
* po_detail
"""
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('buying', 'doctype', 'indent')
reload_doc('buying', 'doctype', 'purchase_order')
reload_doc('buying', 'doctype', 'po_detail')
diff --git a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
index 947c28d..ec45c27 100644
--- a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
+++ b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
@@ -30,5 +30,5 @@
webnotes.conn.commit()
webnotes.conn.begin()
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('stock', 'doctype', 'serial_no')
diff --git a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
index e4078aa..d155107 100644
--- a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
+++ b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import webnotes
-from webnotes.modules.module_manager import reload_doc
+from webnotes.modules import reload_doc
def execute():
"""
diff --git a/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
new file mode 100644
index 0000000..3a94419
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/stock_entry_others_patch.py
@@ -0,0 +1,6 @@
+def execute():
+ import webnotes
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('stock', 'doctype', 'stock_entry')
+
+ webnotes.conn.sql("update `tabDocField` set options = concat(options, '\nOthers') where fieldname = 'purpose' and parent = 'Stock Entry'")
diff --git a/erpnext/patches/jan_mar_2012/update_purpose_se.py b/erpnext/patches/jan_mar_2012/update_purpose_se.py
new file mode 100644
index 0000000..e2b7d9f
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/update_purpose_se.py
@@ -0,0 +1,3 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("update `tabDocField` set options = replace(options, 'Others', 'Other') where fieldname = 'purpose' and parent = 'Stock Entry'")
diff --git a/erpnext/patches/jan_mar_2012/update_se_fld_options.py b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
new file mode 100644
index 0000000..fab0b19
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/update_se_fld_options.py
@@ -0,0 +1,6 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("update `tabDocField` set options = 'Bill Of Materials' where fieldname = 'bom_no' and parent = 'Stock Entry'")
+
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('stock', 'doctype', 'stock_entry')
diff --git a/erpnext/patches/jan_mar_2012/website/domain_list.py b/erpnext/patches/jan_mar_2012/website/domain_list.py
index 25f50e2..26824a4 100644
--- a/erpnext/patches/jan_mar_2012/website/domain_list.py
+++ b/erpnext/patches/jan_mar_2012/website/domain_list.py
@@ -16,7 +16,7 @@
def execute():
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('website', 'doctype', 'website_settings')
res = webnotes.conn.sql("""\
diff --git a/erpnext/patches/mar_2012/pos_invoice_fix.py b/erpnext/patches/mar_2012/pos_invoice_fix.py
new file mode 100644
index 0000000..77ebcb4
--- /dev/null
+++ b/erpnext/patches/mar_2012/pos_invoice_fix.py
@@ -0,0 +1,5 @@
+def execute():
+ import webnotes
+ webnotes.conn.sql("DELETE FROM `tabDocFormat` WHERE format='POS Invoice'")
+ from webnotes.modules.module_manager import reload_doc
+ reload_doc('accounts', 'Print Format', 'POS Invoice')
diff --git a/erpnext/patches/old_patches/customer_address.py b/erpnext/patches/old_patches/customer_address.py
index 44568ce..4757c02 100644
--- a/erpnext/patches/old_patches/customer_address.py
+++ b/erpnext/patches/old_patches/customer_address.py
@@ -21,7 +21,7 @@
from webnotes import msgprint, errprint
def make_address():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('utilities','doctype','address')
from webnotes.model.db_schema import updatedb
@@ -128,7 +128,7 @@
# export_to_files(record_list=[['DocType',dt]])
def reload_doc_files():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('utilities', 'doctype', 'contact')
reload_doc('selling', 'doctype', 'customer')
reload_doc('support', 'doctype', 'customer_issue')
@@ -149,7 +149,7 @@
reload_doc('buying', 'doctype', 'supplier')
def reload_mapper_files():
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('Mapper', 'DocType Mapper', 'Customer Issue-Maintenance Visit')
reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Installation Note')
reload_doc('Mapper', 'DocType Mapper', 'Delivery Note-Receivable Voucher')
diff --git a/erpnext/patches/old_patches/doctype_permission_patch.py b/erpnext/patches/old_patches/doctype_permission_patch.py
index 0953864..b23277a 100644
--- a/erpnext/patches/old_patches/doctype_permission_patch.py
+++ b/erpnext/patches/old_patches/doctype_permission_patch.py
@@ -21,7 +21,7 @@
# remove descriptions
webnotes.conn.sql("update tabDocType set description=null")
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('core','doctype','custom_script')
reload_doc('core','doctype','custom_field')
reload_doc('core','doctype','property_setter')
diff --git a/erpnext/patches/old_patches/feed_patch.py b/erpnext/patches/old_patches/feed_patch.py
index 1edac88..d1fa147 100644
--- a/erpnext/patches/old_patches/feed_patch.py
+++ b/erpnext/patches/old_patches/feed_patch.py
@@ -110,7 +110,7 @@
def support_patch():
# relaod support and other doctypes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
webnotes.model.delete_doc('DocType','Support Ticket')
reload_doc('setup','doctype','support_email_settings')
diff --git a/erpnext/patches/old_patches/patch_1.py b/erpnext/patches/old_patches/patch_1.py
index 4176bf5..9e9cb6f 100644
--- a/erpnext/patches/old_patches/patch_1.py
+++ b/erpnext/patches/old_patches/patch_1.py
@@ -781,12 +781,12 @@
except: pass
# import
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('event_updates','doctype','feed')
elif patch_no==185:
sql("delete from tabDocTrigger where method = 'webnotes.widgets.follow.on_docsave'")
elif patch_no==186:
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('event_updates','doctype','feed')
elif patch_no == 187:
sql("update tabDocType set autoname = '' where name = 'QA Inspection Report'")
@@ -807,7 +807,7 @@
sql("delete from `tabModule Def Item` where parent = 'SRM' and doc_name = 'Landed Cost Wizard' and display_name = 'Landed Cost Wizard'")
import_from_files(record_list = [['stock', 'Module Def', 'Material Management']])
elif patch_no == 195:
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup','doctype','manage_account')
elif patch_no == 196:
sql("update `tabModule Def` set module_page = null where name = 'Material Management'")
diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py
index 744b102..5b9f7a0 100644
--- a/erpnext/patches/patch.py
+++ b/erpnext/patches/patch.py
@@ -24,7 +24,7 @@
def execute(patch_no):
return
import webnotes
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
from webnotes.model.code import get_obj
sql = webnotes.conn.sql
@@ -377,7 +377,7 @@
elif patch_no == 370:
sql("update `tabDocField` set `hidden` = 0 where fieldname = 'group_or_ledger' and parent = 'Cost Center'")
elif patch_no == 371:
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup', 'doctype','features_setup')
flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos']
@@ -393,7 +393,7 @@
get_obj('Features Setup', 'Features Setup').doc.save()
elif patch_no == 372:
- from webnotes.modules.module_manager import reload_doc
+ from webnotes.modules import reload_doc
reload_doc('setup', 'doctype','features_setup')
flds = ['page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos']
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index 2bfaf08..3bf4b6a 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -187,5 +187,25 @@
'patch_file': 'update_stockreco_perm',
'description': 'Update stock reco permission'
},
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'stock_entry_others_patch',
+ 'description': 'new purpose others in stock entry'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'reload_quote',
+ 'description': 'reload quote: organization fld added'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'update_purpose_se',
+ 'description': 'Purpose SE: Others to Other'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'update_se_fld_options',
+ 'description': 'Purpose SE: Others to Other'
+ },
]
diff --git a/erpnext/projects/Module Def/Projects/Projects.txt b/erpnext/projects/Module Def/Projects/Projects.txt
deleted file mode 100644
index f8cf6f7..0000000
--- a/erpnext/projects/Module Def/Projects/Projects.txt
+++ /dev/null
@@ -1,141 +0,0 @@
-[
- {
- '_last_update': '1300959287',
- 'creation': '2010-11-30 17:31:44',
- 'disabled': 'No',
- 'docstatus': 0,
- 'doctype': u'Module Def',
- 'doctype_list': None,
- 'file_list': 'undefined,undefined',
- 'idx': None,
- 'is_hidden': 'No',
- 'last_updated_date': '2011-03-10 15:57:47',
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'module_desc': '<div id="projects_div"></div>',
- 'module_icon': 'puzzle.png',
- 'module_label': 'Projects',
- 'module_name': 'Projects',
- 'module_page': None,
- 'module_seq': 2,
- 'name': 'Projects',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 17:31:44',
- 'description': None,
- 'display_name': 'Project',
- 'doc_name': 'Project',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 1,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDI00099',
- 'owner': 'Administrator',
- 'parent': 'Projects',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': None,
- 'description': None,
- 'display_name': 'Task',
- 'doc_name': 'Ticket',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 2,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDI00285',
- 'owner': None,
- 'parent': 'Projects',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': None,
- 'description': None,
- 'display_name': 'Gantt Chart',
- 'doc_name': 'Projects',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 3,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDI00286',
- 'owner': None,
- 'parent': 'Projects',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': None,
- 'description': None,
- 'display_name': 'Timesheet',
- 'doc_name': 'Timesheet',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 4,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDI00287',
- 'owner': None,
- 'parent': 'Projects',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'creation': '2010-11-30 17:31:44',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDR00012',
- 'owner': 'Administrator',
- 'parent': 'Projects',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Projects User'
- },
- {
- 'creation': '2010-11-30 17:31:44',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'modified': '2011-03-24 15:07:53',
- 'modified_by': 'Administrator',
- 'name': 'MDR00013',
- 'owner': 'Administrator',
- 'parent': 'Projects',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'System Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/help.md b/erpnext/projects/doctype/project/help.md
new file mode 100644
index 0000000..0043f04
--- /dev/null
+++ b/erpnext/projects/doctype/project/help.md
@@ -0,0 +1,5 @@
+You can use projects to:
+
+1. Track budgets (Purchase Orders, Invoices).
+2. Track material consumption.
+3. Create and assign tasks (and view them on a Gantt Chart).
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.txt b/erpnext/projects/doctype/project/project.txt
index 3d57e12..936fd7d 100644
--- a/erpnext/projects/doctype/project/project.txt
+++ b/erpnext/projects/doctype/project/project.txt
@@ -5,47 +5,51 @@
{
'creation': '2010-08-08 17:09:14',
'docstatus': 0,
- 'modified': '2011-01-05 15:24:43',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-12 16:07:48',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1305714062',
+ '_last_update': u'1331542508',
+ 'allow_attach': 1,
'allow_trash': 1,
- 'autoname': 'field:project_name',
- 'colour': 'White:FFF',
+ 'autoname': u'field:project_name',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Master',
- 'module': 'Projects',
+ 'document_type': u'Master',
+ 'max_attachments': 4,
+ 'module': u'Projects',
'name': '__common__',
- 'search_fields': 'customer, status, priority, is_active',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
- 'subject': ' ',
- 'tag_fields': 'status',
- 'version': 32
+ 'search_fields': u'customer, status, priority, is_active',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
+ 'show_in_menu': 0,
+ 'subject': u' ',
+ 'tag_fields': u'status',
+ 'version': 38
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Project',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Project',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Project',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Project',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'permlevel': 0,
'read': 1,
'write': 1
@@ -54,45 +58,58 @@
# DocType, Project
{
'doctype': 'DocType',
- 'name': 'Project'
+ 'name': u'Project'
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'idx': 1,
- 'role': 'All'
+ 'doctype': u'DocPerm',
+ 'role': u'All'
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'idx': 2,
- 'role': 'Projects User'
+ 'doctype': u'DocPerm',
+ 'role': u'Projects User'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Helps you keep track of your projects and links to Tasks. You can tag a task to a project to track its progress',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 1,
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Helps you keep track of your projects and links to Tasks. You can tag a task to a project to track its progress',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'description': 'Project will get saved and will be searchable with project name given',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Data',
- 'idx': 2,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Data',
+ 'description': u'Project will get saved and will be searchable with project name given',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Data',
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'Open',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Status',
+ 'no_copy': 1,
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'Open\nCompleted\nCancelled',
'permlevel': 0,
'reqd': 1,
'search_index': 1
@@ -100,385 +117,357 @@
# DocField
{
- 'colour': 'White:FFF',
- 'default': 'Open',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
- 'idx': 3,
+ 'doctype': u'DocField',
+ 'fieldname': u'is_active',
+ 'fieldtype': u'Select',
+ 'label': u'Is Active',
+ 'oldfieldname': u'is_active',
+ 'oldfieldtype': u'Select',
+ 'options': u'Yes\nNo',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'priority',
+ 'fieldtype': u'Select',
+ 'label': u'Priority',
+ 'oldfieldname': u'priority',
+ 'oldfieldtype': u'Select',
+ 'options': u'Medium\nLow\nHigh',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'project_type',
+ 'fieldtype': u'Data',
+ 'label': u'Project Type',
+ 'oldfieldname': u'project_type',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'project_start_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Status',
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': 'Open\nCompleted\nCancelled',
- 'permlevel': 0,
- 'reqd': 1,
- 'search_index': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'is_active',
- 'fieldtype': 'Select',
- 'idx': 4,
- 'label': 'Is Active',
- 'oldfieldname': 'is_active',
- 'oldfieldtype': 'Select',
- 'options': 'Yes\nNo',
+ 'label': u'Project Start Date',
+ 'oldfieldname': u'project_start_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'priority',
- 'fieldtype': 'Select',
- 'idx': 5,
- 'label': 'Priority',
- 'oldfieldname': 'priority',
- 'oldfieldtype': 'Select',
- 'options': 'Medium\nLow\nHigh',
+ 'doctype': u'DocField',
+ 'fieldname': u'completion_date',
+ 'fieldtype': u'Date',
+ 'label': u'Completion Date',
+ 'oldfieldname': u'completion_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'project_value',
- 'fieldtype': 'Currency',
- 'idx': 6,
- 'label': 'Project Value',
- 'oldfieldname': 'project_value',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'reqd': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'gross_margin_value',
- 'fieldtype': 'Currency',
- 'idx': 7,
- 'label': 'Gross Margin Value',
- 'oldfieldname': 'gross_margin_value',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'reqd': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'per_gross_margin',
- 'fieldtype': 'Currency',
- 'idx': 8,
- 'label': 'Gross Margin %',
- 'oldfieldname': 'per_gross_margin',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'reqd': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'est_material_cost',
- 'fieldtype': 'Currency',
- 'idx': 9,
- 'label': 'Estimated Material Cost',
- 'oldfieldname': 'est_material_cost',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'project_type',
- 'fieldtype': 'Data',
- 'idx': 10,
- 'label': 'Project Type',
- 'oldfieldname': 'project_type',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'act_completion_date',
+ 'fieldtype': u'Date',
+ 'label': u'Actual Completion Date',
+ 'oldfieldname': u'act_completion_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'project_start_date',
- 'fieldtype': 'Date',
- 'idx': 11,
- 'in_filter': 1,
- 'label': 'Project Start Date',
- 'oldfieldname': 'project_start_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'completion_date',
- 'fieldtype': 'Date',
- 'idx': 12,
- 'label': 'Completion Date',
- 'oldfieldname': 'completion_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'act_completion_date',
- 'fieldtype': 'Date',
- 'idx': 13,
- 'label': 'Actual Completion Date',
- 'oldfieldname': 'act_completion_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'amemdment_date',
+ 'fieldtype': u'Date',
'hidden': 1,
- 'idx': 14,
- 'label': 'Amended From',
+ 'label': u'Amemdment Date',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'amemdment_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'Amended From',
+ 'no_copy': 1,
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amemdment_date',
- 'fieldtype': 'Date',
- 'hidden': 1,
- 'idx': 15,
- 'label': 'Amemdment Date',
- 'no_copy': 1,
- 'oldfieldname': 'amemdment_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 16,
- 'label': 'Project Details',
- 'oldfieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Details',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 17,
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldname': u'notes',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Notes',
+ 'oldfieldname': u'notes',
+ 'oldfieldtype': u'Text Editor',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Financials',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_value',
+ 'fieldtype': u'Currency',
+ 'label': u'Project Value',
+ 'oldfieldname': u'project_value',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
- 'width': '50%'
+ 'reqd': 0,
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 18,
- 'oldfieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldname': u'est_material_cost',
+ 'fieldtype': u'Currency',
+ 'label': u'Estimated Material Cost',
+ 'oldfieldname': u'est_material_cost',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'notes',
- 'fieldtype': 'Text Editor',
- 'idx': 19,
- 'label': 'Notes',
- 'oldfieldname': 'notes',
- 'oldfieldtype': 'Text Editor',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_gross_margin',
+ 'fieldtype': u'Currency',
+ 'label': u'Gross Margin %',
+ 'oldfieldname': u'per_gross_margin',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'reqd': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'gross_margin_value',
+ 'fieldtype': u'Currency',
+ 'label': u'Gross Margin Value',
+ 'oldfieldname': u'gross_margin_value',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'reqd': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Customer Details',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 20,
- 'label': 'Customer Details',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Select name of Customer to whom project belongs',
- 'doctype': 'DocField',
- 'fieldname': 'customer',
- 'fieldtype': 'Link',
- 'idx': 21,
+ 'colour': u'White:FFF',
+ 'description': u'Select name of Customer to whom project belongs',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Customer',
- 'oldfieldname': 'customer',
- 'oldfieldtype': 'Link',
- 'options': 'Customer',
+ 'label': u'Customer',
+ 'oldfieldname': u'customer',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
- 'idx': 22,
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
'in_filter': 1,
- 'label': 'Customer Name',
- 'oldfieldname': 'customer_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Customer Name',
+ 'oldfieldname': u'customer_name',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
- 'search_index': 0
+ 'search_index': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_address',
- 'fieldtype': 'Small Text',
- 'idx': 23,
- 'label': 'Customer Address',
- 'oldfieldname': 'customer_address',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_address',
+ 'fieldtype': u'Small Text',
+ 'label': u'Customer Address',
+ 'oldfieldname': u'customer_address',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
- 'idx': 24,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Contact Person',
- 'oldfieldname': 'contact_person',
- 'oldfieldtype': 'Link',
+ 'label': u'Contact Person',
+ 'oldfieldname': u'contact_person',
+ 'oldfieldtype': u'Link',
'permlevel': 0,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'territory',
- 'fieldtype': 'Link',
- 'idx': 25,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'territory',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Territory',
- 'oldfieldname': 'territory',
- 'oldfieldtype': 'Link',
- 'options': 'Territory',
+ 'label': u'Territory',
+ 'oldfieldname': u'territory',
+ 'oldfieldtype': u'Link',
+ 'options': u'Territory',
'permlevel': 0,
'reqd': 0,
- 'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_no',
- 'fieldtype': 'Data',
- 'idx': 26,
- 'label': 'Contact No',
- 'oldfieldname': 'contact_no',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_no',
+ 'fieldtype': u'Data',
+ 'label': u'Contact No',
+ 'oldfieldname': u'contact_no',
+ 'oldfieldtype': u'Data',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'email_id',
- 'fieldtype': 'Data',
- 'idx': 27,
- 'label': 'Email Id',
- 'oldfieldname': 'email_id',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'email_id',
+ 'fieldtype': u'Data',
+ 'label': u'Email Id',
+ 'oldfieldname': u'email_id',
+ 'oldfieldtype': u'Data',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_group',
- 'fieldtype': 'Link',
- 'idx': 28,
- 'label': 'Customer Group',
- 'oldfieldname': 'customer_group',
- 'oldfieldtype': 'Link',
- 'options': 'Customer Group',
- 'permlevel': 1,
- 'search_index': 0
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_group',
+ 'fieldtype': u'Link',
+ 'label': u'Customer Group',
+ 'oldfieldname': u'customer_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer Group',
+ 'permlevel': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Important dates and commitments in your project life cycle',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 29,
- 'label': 'Milestones',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Important dates and commitments in your project life cycle',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Milestones',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'project_milestones',
- 'fieldtype': 'Table',
- 'idx': 30,
- 'label': 'Project Milestones',
- 'oldfieldname': 'project_milestones',
- 'oldfieldtype': 'Table',
- 'options': 'Project Milestone',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_milestones',
+ 'fieldtype': u'Table',
+ 'label': u'Project Milestones',
+ 'oldfieldname': u'project_milestones',
+ 'oldfieldtype': u'Table',
+ 'options': u'Project Milestone',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'trash_reason',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'trash_reason',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'idx': 31,
- 'label': 'Trash Reason',
- 'oldfieldname': 'trash_reason',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Trash Reason',
+ 'oldfieldname': u'trash_reason',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'file_list',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'File List',
+ 'no_copy': 1,
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/projects/doctype/project_activity/project_activity.js b/erpnext/projects/doctype/project_activity/project_activity.js
index ed2b1df..02a6dbf 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.js
+++ b/erpnext/projects/doctype/project_activity/project_activity.js
@@ -55,7 +55,7 @@
if (ci==0){
var d1 = $a(cell,'div');
var img = $a(cell,'img','',{width:'40px'});
- set_user_img(img,d[ri][0])
+ img.src = wn.user_info(d[ri][0]).image;
var d2 = $a(cell,'div');
d2.innerHTML = d[ri][0] + ' on: ' + date.str_to_user(d[ri][1]);
}
diff --git a/erpnext/selling/Module Def/Selling/Selling.txt b/erpnext/selling/Module Def/Selling/Selling.txt
deleted file mode 100644
index 42c8449..0000000
--- a/erpnext/selling/Module Def/Selling/Selling.txt
+++ /dev/null
@@ -1,335 +0,0 @@
-# Module Def, Selling
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:39:08',
- 'docstatus': 0,
- 'modified': '2012-01-23 18:25:58',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Selling',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Selling',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'doctype_list': 'Print Format, Sales Order\nPrint Format, Quotation Format\nPrint Format, Delivery Note Format',
- 'file_list': 'crm.gif,FileData/00208',
- 'is_hidden': 'No',
- 'module_desc': 'Manage you sales team, with your leads, customers, quotes, orders etc.',
- 'module_icon': 'Selling.gif',
- 'module_label': 'Selling',
- 'module_name': 'Selling',
- 'module_seq': 3,
- 'name': '__common__'
- },
-
- # Module Def, Selling
- {
- 'doctype': u'Module Def',
- 'name': 'Selling'
- },
-
- # Module Def Item
- {
- 'description': 'Database of potential customers you need to keep in touch with',
- 'display_name': 'Lead',
- 'doc_name': 'Lead',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nlead_owner\nlead_name\ncontact_no\ncontact_by\ncontact_date\nexpected_month'
- },
-
- # Module Def Item
- {
- 'description': 'Your Customer Database',
- 'display_name': 'Customer',
- 'doc_name': 'Customer',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'customer_group\ncountry'
- },
-
- # Module Def Item
- {
- 'description': 'Specific requirements from a Lead / Customer',
- 'display_name': 'Enquiry',
- 'doc_name': 'Enquiry',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\ncustomer\ncontact_person\ncost_center\ncompany'
- },
-
- # Module Def Item
- {
- 'description': 'Offers you have made to your customers',
- 'display_name': 'Quotation',
- 'doc_name': 'Quotation',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\ncustomer\ncontact_person\ncost_center\ngrand_total\ncompany'
- },
-
- # Module Def Item
- {
- 'description': 'Database of confirmed Sale Orders from your Customers',
- 'display_name': 'Sales Order',
- 'doc_name': 'Sales Order',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\ncustomer\ncost_center\ngrand_total\nper_delivered\nper_billed\ncompany'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Dashboard',
- 'doc_name': 'Sales Dashboard',
- 'doc_type': 'Pages',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'doc_name': 'Reports',
- 'doc_type': 'Separator',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Gross Profit',
- 'doc_name': 'Delivery Note Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Territory, Item Group wise GP',
- 'doc_name': 'Delivery Note',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Sales Details',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Delivery Details',
- 'doc_name': 'Delivery Note Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Personwise Transaction Summary',
- 'doc_name': 'Sales Person',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Total Target Variance Report',
- 'doc_name': 'Target Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Persons Target Variance (Item Group wise)',
- 'doc_name': 'Target Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Territories Target Variance (Item Group wise)',
- 'doc_name': 'Target Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Order Pending Items',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Orderwise Booking & Delivery Summary',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Orderwise Pending Qty To Deliver',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Sales Orderwise Pending Amount To Bill',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Delivered Items to be Install',
- 'doc_name': 'Delivery Note Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Itemwise Price List',
- 'doc_name': 'Ref Rate Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Follow-up Report',
- 'doc_name': 'Follow up',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Ledger details of your debtors',
- 'display_name': "Debtor's Ledger",
- 'doc_name': 'GL Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Report displaying Customer, Primary Address Details & Primary Contact Details',
- 'display_name': 'Customer Address Contact',
- 'doc_name': 'Customer',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Customer Category',
- 'display_name': 'Customer Group',
- 'doc_name': 'Customer Group',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'id\ndescription'
- },
-
- # Module Def Item
- {
- 'description': 'Sales person details',
- 'display_name': 'Sales Person',
- 'doc_name': 'Sales Person',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'id\nterritory\ndepartment\nmobile_no\nemail_id'
- },
-
- # Module Def Item
- {
- 'description': 'Item master',
- 'display_name': 'Item',
- 'doc_name': 'Item',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'name\nitem_group\ndescription'
- },
-
- # Module Def Item
- {
- 'description': 'Sales partner details',
- 'display_name': 'Sales Partner',
- 'doc_name': 'Sales Partner',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'id\npartner_type\nmobile\nemail\nterritory'
- },
-
- # Module Def Item
- {
- 'description': 'Business campaigns',
- 'display_name': 'Campaign',
- 'doc_name': 'Campaign',
- 'doc_type': 'Setup Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'id\ncampaign_name\ndescription'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Administrator'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Sales Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Sales User'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Sales Master Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 89b95fa..9f5f717 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-$import(Contact Control)
+wn.require('erpnext/setup/doctype/contact_control/contact_control.js');
/* ********************************* onload ********************************************* */
@@ -68,19 +68,10 @@
cur_frm.cscript.make_address = function() {
if(!cur_frm.address_list) {
- cur_frm.address_list = new wn.widgets.Listing({
+ cur_frm.address_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Address HTML'].wrapper,
page_length: 2,
new_doctype: "Address",
- new_doc_onload: function(dn) {
- ndoc = locals["Address"][dn];
- ndoc.customer = cur_frm.doc.name;
- ndoc.customer_name = cur_frm.doc.customer_name;
- ndoc.address_type = 'Office';
- },
- new_doc_onsave: function(dn) {
- cur_frm.address_list.run()
- },
get_query: function() {
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
@@ -110,21 +101,10 @@
cur_frm.cscript.make_contact = function() {
if(!cur_frm.contact_list) {
- cur_frm.contact_list = new wn.widgets.Listing({
+ cur_frm.contact_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Contact HTML'].wrapper,
page_length: 2,
new_doctype: "Contact",
- new_doc_onload: function(dn) {
- ndoc = locals["Contact"][dn];
- ndoc.customer = cur_frm.doc.name;
- ndoc.customer_name = cur_frm.doc.customer_name;
- if(cur_frm.doc.customer_type == 'Individual') {
- ndoc.first_name = cur_frm.doc.customer_name;
- }
- },
- new_doc_onsave: function(dn) {
- cur_frm.contact_list.run()
- },
get_query: function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
@@ -174,6 +154,7 @@
// make quotation list
// --------------------
cur_frm.cscript.make_qtn_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','20%','20%','15%'];
@@ -191,6 +172,8 @@
// make so list
// -------------
cur_frm.cscript.make_so_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
+
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','30%','25%'];
lst.colnames = ['Sr.','Id','Status','Sales Order Date','Grand Total'];
@@ -207,6 +190,8 @@
// make dn list
// -------------
cur_frm.cscript.make_dn_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
+
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','20%','20%','15%'];
lst.colnames = ['Sr.','Id','Status','Delivery Note Date','Territory','Grand Total'];
@@ -223,6 +208,8 @@
// make si list
// -------------
cur_frm.cscript.make_si_list = function(parent,doc){
+ wn.require('lib/js/legacy/widgets/listing.js');
+
var lst = new Listing();
lst.colwidths = ['5%','20%','20%','20%','20%','15%'];
lst.colnames = ['Sr.','Id','Posting Date','Due Date','Debit To','Grand Total'];
diff --git a/erpnext/selling/doctype/customer/customer.txt b/erpnext/selling/doctype/customer/customer.txt
index 346b4d1..993dc29 100644
--- a/erpnext/selling/doctype/customer/customer.txt
+++ b/erpnext/selling/doctype/customer/customer.txt
@@ -203,7 +203,7 @@
# DocField
{
'colour': u'White:FFF',
- 'description': u'<a href="javascript:cur_frm.cscript.CGHelp();">To manage Customer Groups, click here</a>',
+ 'description': u'<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>',
'doctype': u'DocField',
'fieldname': u'customer_group',
'fieldtype': u'Link',
@@ -223,7 +223,7 @@
# DocField
{
'colour': u'White:FFF',
- 'description': u'<a href="javascript:cur_frm.cscript.TerritoryHelp();">To manage Territory, click here</a>',
+ 'description': u'<a href="#!Sales Browser/Territory">To manage Territory, click here</a>',
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
diff --git a/erpnext/selling/doctype/enquiry/enquiry.js b/erpnext/selling/doctype/enquiry/enquiry.js
index c3f0a0b..bf2628f 100644
--- a/erpnext/selling/doctype/enquiry/enquiry.js
+++ b/erpnext/selling/doctype/enquiry/enquiry.js
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-$import(SMS Control)
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
cur_frm.cscript.refresh = function(doc, cdt, cdn){
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 7255636..a32acf7 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -16,7 +16,7 @@
// Module CRM
-$import(SMS Control)
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(user =='Guest'){
diff --git a/erpnext/selling/doctype/lead/listview.js b/erpnext/selling/doctype/lead/listview.js
new file mode 100644
index 0000000..b5ed6b8
--- /dev/null
+++ b/erpnext/selling/doctype/lead/listview.js
@@ -0,0 +1,32 @@
+wn.doclistviews['Lead'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ 'tabLead.lead_name',
+ 'tabLead.status',
+ 'tabLead.source',
+ 'tabLead.rating'
+ ]);
+ this.stats = this.stats.concat(['status', 'source', 'rating']);
+ },
+
+ prepare_data: function(data) {
+ this._super(data);
+ if(data.status=='Interested') {
+ data.label_type = 'success'
+ }
+ else if(['Open', 'Attempted to Contact', 'Contacted', 'Contact in Future'].indexOf(data.status)!=-1) {
+ data.label_type = 'info'
+ }
+ data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
+
+ data.lead_name = (data.rating ? ('['+data.rating+'] ') : '') + '['+data.source+'] ' + data.lead_name;
+ },
+
+ columns: [
+ {width: '20%', content:'name'},
+ {width: '12%', content:'status_html'},
+ {width: '55%', content:'tags+lead_name', css: {color:'#aaa'}},
+ {width: '13%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+})
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 7f40782..12d6d1e 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -21,9 +21,10 @@
cur_frm.cscript.sales_team_fname = "sales_team";
// =====================================================================================
-$import(Sales Common)
-$import(Other Charges)
-$import(SMS Control)
+wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
+wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
// ONLOAD
// ===================================================================================
@@ -41,7 +42,7 @@
if(doc.quotation_to) {
if(doc.quotation_to == 'Customer') {
- hide_field(['lead', 'lead_name']);
+ hide_field(['lead', 'lead_name', 'organization']);
}
else if (doc.quotation_to == 'Lead') {
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
@@ -60,16 +61,11 @@
// hide - unhide fields based on lead or customer..
// =======================================================================================================================
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
- if(doc.quotation_to == 'Lead'){
- unhide_field(['lead']);
- hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
- doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
- }
- else if(doc.quotation_to == 'Customer'){
- unhide_field(['customer']);
- hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory']);
- doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
- }
+ hide_field(['lead', 'lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group', 'organization']);
+ if(doc.quotation_to == 'Lead') unhide_field(['lead']);
+ else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
+
+ doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = "";
}
@@ -107,12 +103,19 @@
cur_frm.refresh();
}
- if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
- if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+ if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name),
+ 'get_default_customer_address', '', callback);
+ if(doc.customer) unhide_field(['customer_address','contact_person','customer_name',
+ 'address_display','contact_display','contact_mobile','contact_email','territory',
+ 'customer_group']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
- if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
+ if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({
+ customer: doc.customer,
+ address: doc.customer_address,
+ contact: doc.contact_person
+ }),'', doc, dt, dn, 1);
}
cur_frm.fields_dict.customer_address.on_new = function(dn) {
@@ -140,7 +143,7 @@
cur_frm.cscript.lead = function(doc, cdt, cdn) {
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
- if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
+ if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory', 'organization']);
}
@@ -326,7 +329,6 @@
return repl("SELECT name, item_name, description FROM tabItem WHERE `tabItem`.%(key)s LIKE '%s' %(cond)s ORDER BY tabItem.item_code DESC LIMIT 50", {cond:cond});
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Quotation',
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index de4056d..27206b2 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -116,26 +116,8 @@
# Pull details from other charges master (Get Other Charges)
# ----------------------------------------------------------
def get_other_charges(self):
- return get_obj('Sales Common').get_other_charges(self)
+ return get_obj('Sales Common').get_other_charges(self)
- # Get Lead Details along with its details
- # ==============================================================
- def get_lead_details1(self, name):
- details = sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id from `tabLead` where name = '%s'" %(name), as_dict = 1)
- ret = {
- 'lead_name' : details and details[0]['lead_name'] or '',
- 'address_display' : (details and details[0]['address_line1']
- + (details[0]['address_line2'] and '\n' + details[0]['address_line2'] or '') + '\n'
- + details[0]['city']
- + (details[0]['pincode'] and ', ' + details[0]['pincode'] or '') + '\n'
- + (details[0]['state'] and details[0]['state']+', ' or '')
- + details[0]['country'] + '\nTel: ' + details[0]['contact_no'] + '\n' or '-'),
- 'territory' : details and details[0]['territory'] or '',
- 'contact_mobile' : details and details[0]['mobile_no'] or '-',
- 'contact_email' : details and details[0]['email_id'] or '-'
- }
- return ret
-
# GET TERMS AND CONDITIONS
# ====================================================================================
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index 32784a8..c8e3ecb 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:17',
'docstatus': 0,
- 'modified': '2012-03-02 12:20:40',
+ 'modified': '2012-03-20 14:56:28',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -21,7 +21,7 @@
# These values are common for all DocType
{
- '_last_update': u'1330069750',
+ '_last_update': u'1332235370',
'allow_attach': 1,
'allow_email': 0,
'allow_trash': 1,
@@ -41,7 +41,7 @@
'show_in_menu': 0,
'subject': u'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s',
'tag_fields': u'status',
- 'version': 618
+ 'version': 621
},
# These values are common for all DocFormat
@@ -294,6 +294,15 @@
# DocField
{
+ 'doctype': u'DocField',
+ 'fieldname': u'organization',
+ 'fieldtype': u'Data',
+ 'label': u'Organization',
+ 'permlevel': 1
+ },
+
+ # DocField
+ {
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldname': u'address_display',
@@ -385,7 +394,7 @@
'oldfieldtype': u'Select',
'options': u'\nSales\nMaintenance',
'permlevel': 0,
- 'print_hide': 0,
+ 'print_hide': 1,
'reqd': 1,
'search_index': 0
},
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index cad8ec1..192875c 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -18,7 +18,7 @@
// ------
// cur_frm.cscript.tname - Details table name
// cur_frm.cscript.fname - Details fieldname
-// cur_frm.cscript.other_fname - Other Charges fieldname
+// cur_frm.cscript.other_fname - wn.require('erpnext/setup/doctype/other_charges/other_charges.js'); fieldname
// cur_frm.cscript.sales_team_fname - Sales Team fieldname
// ============== Load Default Taxes ===================
@@ -100,14 +100,14 @@
'grand_total': 'Grand Total', 'rounded_total': 'Rounded Total', 'in_words': 'In Words'}
par_cols_export = {'grand_total_export': 'Grand Total', 'rounded_total_export': 'Rounded Total', 'in_words_export': 'In Words'};
- for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
- for (d in par_cols_export) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_export[d]+' (' + doc.currency + ')';
- cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
- cur_frm.fields_dict['plc_conversion_rate'].label_area.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')';
+ for (d in par_cols_base) cur_frm.fields_dict[d].label_span.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
+ for (d in par_cols_export) cur_frm.fields_dict[d].label_span.innerHTML = par_cols_export[d]+' (' + doc.currency + ')';
+ cur_frm.fields_dict['conversion_rate'].label_span.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
+ cur_frm.fields_dict['plc_conversion_rate'].label_span.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')';
if (doc.doctype == 'Receivable Voucher') {
- cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (' + base_curr + ')';
- cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')';
+ cur_frm.fields_dict['total_advance'].label_span.innerHTML = 'Total Advance (' + base_curr + ')';
+ cur_frm.fields_dict['outstanding_amount'].label_span.innerHTML = 'Outstanding Amount (' + base_curr + ')';
}
}
@@ -212,13 +212,16 @@
cur_frm.cscript.conversion_rate = cur_frm.cscript.currency;
cur_frm.cscript.plc_conversion_rate = cur_frm.cscript.currency;
-cur_frm.cscript.company = function(doc, dt, dn) {
+cur_frm.cscript.company = function(doc, cdt, cdn) {
wn.call({
method: 'selling.doctype.sales_common.sales_common.get_comp_base_currency',
args: {company:doc.company},
callback: function(r, rt) {
- var doc = locals[dt][dn];
- set_multiple(doc.doctype, doc.name, {currency:r.message, price_list_currency:r.message});
+ var doc = locals[cdt][cdn];
+ set_multiple(doc.doctype, doc.name, {
+ currency:r.message,
+ price_list_currency:r.message
+ });
cur_frm.cscript.currency(doc, cdt, cdn);
}
});
@@ -249,9 +252,20 @@
// ******************** ITEM CODE ********************************
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
if (doc.order_type == 'Maintenance')
- return 'SELECT tabItem.name,tabItem.item_name,tabItem.description FROM tabItem WHERE tabItem.is_service_item="Yes" AND tabItem.docstatus != 2 AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") AND tabItem.%(key)s LIKE "%s" LIMIT 50';
+ return 'SELECT tabItem.name,tabItem.item_name,tabItem.description \
+ FROM tabItem WHERE tabItem.is_service_item="Yes" \
+ AND tabItem.docstatus != 2 \
+ AND (ifnull(`tabItem`.`end_of_life`,"") = "" \
+ OR `tabItem`.`end_of_life` > NOW() \
+ OR `tabItem`.`end_of_life`="0000-00-00") \
+ AND tabItem.%(key)s LIKE "%s" LIMIT 50';
else
- return 'SELECT tabItem.name,tabItem.item_name,tabItem.description FROM tabItem WHERE tabItem.is_sales_item="Yes" AND tabItem.docstatus != 2 AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") AND tabItem.%(key)s LIKE "%s" LIMIT 50';
+ return 'SELECT tabItem.name,tabItem.item_name,tabItem.description FROM tabItem \
+ WHERE tabItem.is_sales_item="Yes" AND tabItem.docstatus != 2 \
+ AND (ifnull(`tabItem`.`end_of_life`,"") = "" \
+ OR `tabItem`.`end_of_life` > NOW() \
+ OR `tabItem`.`end_of_life`="0000-00-00") \
+ AND tabItem.%(key)s LIKE "%s" LIMIT 50';
}
@@ -267,8 +281,14 @@
var callback = function(r, rt){
cur_frm.cscript.recalc(doc, 1);
}
- var args = {'item_code':d.item_code, 'income_account':d.income_account, 'cost_center': d.cost_center, 'warehouse': d.warehouse};
- get_server_fields('get_item_details',JSON.stringify(args), fname,doc,cdt,cdn,1,callback);
+ var args = {
+ 'item_code':d.item_code,
+ 'income_account':d.income_account,
+ 'cost_center': d.cost_center,
+ 'warehouse': d.warehouse
+ };
+ get_server_fields('get_item_details',JSON.stringify(args),
+ fname,doc,cdt,cdn,1,callback);
}
}
if(cur_frm.cscript.custom_item_code){
@@ -358,8 +378,14 @@
var sales_team = cur_frm.cscript.sales_team_fname;
var other_fname = cur_frm.cscript.other_fname;
- if(!flt(doc.conversion_rate)) { doc.conversion_rate = 1; refresh_field('conversion_rate'); }
- if(!flt(doc.plc_conversion_rate)) { doc.plc_conversion_rate = 1; refresh_field('plc_conversion_rate'); }
+ if(!flt(doc.conversion_rate)) {
+ doc.conversion_rate = 1;
+ refresh_field('conversion_rate');
+ }
+ if(!flt(doc.plc_conversion_rate)) {
+ doc.plc_conversion_rate = 1;
+ refresh_field('plc_conversion_rate');
+ }
if(n > 0) cur_frm.cscript.update_fname_table(doc , tname , fname , n, other_fname); // updates all values in table (i.e. amount, export amount, net total etc.)
@@ -378,7 +404,7 @@
}
cur_frm.cscript.calc_other_charges(doc , tname , fname , other_fname); // calculate other charges
}
- cur_frm.cscript.calc_doc_values(doc, cdt, cdn, tname, fname, other_fname); // calculates total amounts
+ cur_frm.cscript.calc_doc_values(doc, null, null, tname, fname, other_fname); // calculates total amounts
// ******************* calculate allocated amount of sales person ************************
cl = getchildren('Sales Team', doc.name, sales_team);
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index 9186bb8..63f53ea 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -209,13 +209,14 @@
if default: add_cond = 'ifnull(t2.is_default,0) = 1'
else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"'
idx = 0
- other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
+ other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center_other_charges from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
for other in other_charge:
d = addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist)
d.charge_type = other['charge_type']
d.row_id = other['row_id']
d.description = other['description']
d.account_head = other['account_head']
+ d.cost_center_other_charges = other['cost_center_other_charges']
d.rate = flt(other['rate'])
d.tax_amount = flt(other['tax_amount'])
d.included_in_print_rate = cint(other['included_in_print_rate'])
diff --git a/erpnext/selling/doctype/sales_order/listview.js b/erpnext/selling/doctype/sales_order/listview.js
new file mode 100644
index 0000000..c0b3895
--- /dev/null
+++ b/erpnext/selling/doctype/sales_order/listview.js
@@ -0,0 +1,32 @@
+// render
+wn.doclistviews['Sales Order'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabSales Order`.customer_name",
+ "ifnull(`tabSales Order`.per_delivered,0) as per_delivered",
+ "ifnull(`tabSales Order`.per_billed,0) as per_billed",
+ "`tabSales Order`.currency",
+ "ifnull(`tabSales Order`.grand_total_export,0) as grand_total_export"
+ ]);
+ this.stats = this.stats.concat(['status']);
+ },
+
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '15%', content:'name'},
+ {width: '37%', content:'tags+customer_name', css: {color:'#aaa'}},
+ {
+ width: '18%',
+ content: function(parent, data) {
+ $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_export))
+ },
+ css: {'text-align':'right'}
+ },
+ {width: '8%', content: 'per_delivered', type:'bar-graph', label:'Delivered'},
+ {width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
+ {width: '10%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+
+});
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index a04423d..9a877c6 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -22,9 +22,10 @@
cur_frm.cscript.sales_team_fname = "sales_team";
-$import(Sales Common)
-$import(Other Charges)
-$import(SMS Control)
+wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
+wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
// ONLOAD
@@ -35,7 +36,7 @@
if(!doc.price_list_currency) set_multiple(cdt, cdn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
// load default charges
- if(doc.__islocal){
+ if(doc.__islocal && !doc.customer){
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
}
}
@@ -100,13 +101,16 @@
//customer
cur_frm.cscript.customer = function(doc,dt,dn) {
var callback = function(r,rt) {
- var doc = locals[cur_frm.doctype][cur_frm.docname];
- get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0);
+ var callback2 = function(r, rt) {
+ if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
cur_frm.refresh();
+ }
+ var doc = locals[cur_frm.doctype][cur_frm.docname];
+ get_server_fields('get_shipping_address',doc.customer,'',doc, dt, dn, 0, callback2);
+
}
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
- if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@@ -352,7 +356,6 @@
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Sales Order',
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index b079515..8137d04 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -49,7 +49,7 @@
var tr_main_grid = make_table(div_body,1,2,'100%',['60%','40%'],{width: "100%", tableLayout: "fixed", borderCollapse: "collapse", border:"0px", padding:"4px 4px 4px 4px"});
$y($td(tr_main_grid,0,0),{border: "1px solid #dddddd", padding: "8px", width: "60%"});
- this.tree_area = $a($td(tr_main_grid,0,0),'div');
+ this.tree_area = $a($td(tr_main_grid,0,0),'div','',{minHeight:'400px'});
$y($td(tr_main_grid,0,1),{border: "1px solid #DDD"});
this.detail_area = $a($td(tr_main_grid,0,1),'div');
diff --git a/erpnext/selling/page/sales_dashboard/sales_dashboard.js b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
index 1af5cb4..e89c7fb 100644
--- a/erpnext/selling/page/sales_dashboard/sales_dashboard.js
+++ b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
@@ -22,8 +22,8 @@
$dh(pscript.mnt_div1);
//pscript.dx_axis = [];
- wn.require('lib/css/jqpot.css');
- wn.require('lib/js/legacy/jquery/jquery.jqplot.min.js');
+ wn.require('lib/css/lib/jqplot.css');
+ wn.require('lib/js/lib/jqplot/jquery.jqplot.min.js');
pscript.all_onchnge();
}
//=======================================================================
diff --git a/erpnext/setup/Module Def/Setup/Setup.txt b/erpnext/setup/Module Def/Setup/Setup.txt
deleted file mode 100644
index 5a0dcf7..0000000
--- a/erpnext/setup/Module Def/Setup/Setup.txt
+++ /dev/null
@@ -1,652 +0,0 @@
-[
- {
- '_last_update': None,
- 'creation': '2010-11-30 22:43:08',
- 'disabled': 'No',
- 'docstatus': 0,
- 'doctype': 'Module Def',
- 'doctype_list': None,
- 'file_list': None,
- 'idx': None,
- 'is_hidden': 'No',
- 'last_updated_date': '2011-03-21 12:13:39',
- 'modified': '2010-09-25 00:00:00',
- 'modified_by': 'Administrator',
- 'module_desc': None,
- 'module_icon': 'wired.png',
- 'module_label': 'Setup',
- 'module_name': 'Setup',
- 'module_page': 'Setup',
- 'module_seq': 1,
- 'name': 'Setup',
- 'owner': 'Administrator',
- 'parent': None,
- 'parentfield': None,
- 'parenttype': None,
- 'trash_reason': None,
- 'widget_code': None
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'All important setup items in one place',
- 'display_name': 'Setup Wizard',
- 'doc_name': 'Setup Wizard',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'lightbulb.gif',
- 'idx': 1,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00221',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Personalize settings like company banner, date format, print format header etc.',
- 'display_name': 'Personalize',
- 'doc_name': 'Personalize Page',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'star.gif',
- 'idx': 2,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00222',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Enable / Disable users. Set user roles.',
- 'display_name': 'Manage Users',
- 'doc_name': 'Manage Users',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'group.gif',
- 'idx': 3,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00223',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Set global default values and account settings',
- 'display_name': 'Setup Defaults',
- 'doc_name': 'Manage Account',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'folder.gif',
- 'idx': 4,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00224',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'General Masters',
- 'display_name': 'Setup Masters',
- 'doc_name': 'Setup Masters',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'wrench.gif',
- 'idx': 5,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00225',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': None,
- 'display_name': 'Sales Browser',
- 'doc_name': 'Sales Browser',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 6,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00226',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': None,
- 'doc_name': None,
- 'doc_type': 'Separator',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 7,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003107',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': "Import data like Customers, Items etc in 'CSV' format",
- 'display_name': 'Import Data',
- 'doc_name': 'Import Data',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'disk.gif',
- 'idx': 8,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00228',
- 'owner': 'nabin@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Set series prefix for transactions',
- 'display_name': 'Setup Series',
- 'doc_name': 'Naming Series',
- 'doc_type': 'Single DocType',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': 'paperclip.gif',
- 'idx': 9,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00229',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Set approval rights for transactions based on grand total and discount.',
- 'display_name': 'Authorization Rule',
- 'doc_name': 'Authorization Rule',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'transaction\nbased_on\nmaster_name\nsystem_user\nsystem_role\napproving_role\napproving_user\nvalue',
- 'hide': None,
- 'icon': 'accept.gif',
- 'idx': 10,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00230',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Add fields in transactions, masters...',
- 'display_name': 'Custom Field',
- 'doc_name': 'Custom Field',
- 'doc_type': 'Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': 'dt\nlabel\nfieldtype\noptions',
- 'hide': None,
- 'icon': 'paperclip.gif',
- 'idx': 11,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00231',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2010-11-30 22:43:08',
- 'description': 'Contains records that you have trashed.',
- 'display_name': 'Trash',
- 'doc_name': 'Trash',
- 'doc_type': 'Pages',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 12,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': 'MDI00232',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Price List',
- 'doc_name': 'Price List',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 13,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003108',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Warehouse Type',
- 'doc_name': 'Warehouse Type',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 14,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003109',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Warehouse',
- 'doc_name': 'Warehouse',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 15,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003110',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'UOM',
- 'doc_name': 'UOM',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 16,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003111',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Term',
- 'doc_name': 'Term',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 17,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003112',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Taxes and Charges',
- 'doc_name': 'Other Charges',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 18,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003113',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Business Letter Type',
- 'doc_name': 'Business Letter Type',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 19,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003114',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Business Letter Template',
- 'doc_name': 'Business Letter Template',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 20,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003115',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'click_function': None,
- 'creation': '2011-03-24 15:04:47',
- 'description': None,
- 'display_name': 'Mode of Payment',
- 'doc_name': 'Mode of Payment',
- 'doc_type': 'Setup Forms',
- 'docstatus': 0,
- 'doctype': 'Module Def Item',
- 'fields': None,
- 'hide': None,
- 'icon': None,
- 'idx': 21,
- 'modified': '2011-03-24 15:04:47',
- 'modified_by': 'Administrator',
- 'name': '000003116',
- 'owner': 'harshada@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 1,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00042',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Administrator'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 2,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00043',
- 'owner': 'Administrator',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'System Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 3,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00044',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Sales User'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 4,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00045',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Sales Master Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 5,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00046',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Sales Master Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 6,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00047',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Purchase User'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 7,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00048',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Purchase Master Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 8,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00049',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Purchase Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 9,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00050',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Material User'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 10,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00051',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Material Master Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 11,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00052',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Material Manager'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 12,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00053',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Accounts User'
- },
- {
- 'creation': '2010-11-30 22:43:08',
- 'docstatus': 0,
- 'doctype': 'Module Def Role',
- 'idx': 13,
- 'modified': '2010-11-30 22:43:08',
- 'modified_by': 'Administrator',
- 'name': 'MDR00054',
- 'owner': 'saumil@webnotestech.com',
- 'parent': 'Setup',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def',
- 'role': 'Accounts Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/setup/Role/System Manager/System Manager.txt b/erpnext/setup/Role/System Manager/System Manager.txt
deleted file mode 100644
index 0918bc4..0000000
--- a/erpnext/setup/Role/System Manager/System Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, System Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2009-07-07 17:00:24',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Setup',
- 'name': '__common__',
- 'role_name': 'System Manager'
- },
-
- # Role, System Manager
- {
- 'doctype': 'Role',
- 'name': 'System Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/setup/__init__.py b/erpnext/setup/__init__.py
index e69de29..dad1873 100644
--- a/erpnext/setup/__init__.py
+++ b/erpnext/setup/__init__.py
@@ -0,0 +1,3 @@
+install_docs = [
+ {'doctype':'Role', 'name': 'System Manager'}
+]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/contact_control/contact_control.js b/erpnext/setup/doctype/contact_control/contact_control.js
index b6825eb..f58e75d 100755
--- a/erpnext/setup/doctype/contact_control/contact_control.js
+++ b/erpnext/setup/doctype/contact_control/contact_control.js
@@ -1,14 +1,6 @@
// common partner functions
// =========================
-/*
-// make shipping list body
-// ------------------------
-cur_frm.cscript.make_sl_body = function(){
- cur_frm.fields_dict['Shipping HTML'].wrapper.innerHTML = '';
- cur_frm.shipping_html = $a(cur_frm.fields_dict['Shipping HTML'].wrapper,'div');
-}
-*/
// make history list body
// -----------------------
@@ -18,35 +10,6 @@
}
-/*
-// set shipping list message
-// --------------------------
-cur_frm.cscript.set_sl_msg = function(doc){
- cur_frm.shipping_html.innerHTML = 'Shipping Address Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-/*
-// set history list message
-// -------------------------
-cur_frm.cscript.set_hl_msg = function(doc){
- cur_frm.history_html.innerHTML= 'History Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-
-
-/*
-// make shipping address
-// -------------
-cur_frm.cscript.make_shipping_address = function(doc, dt, dn){
- cur_frm.shipping_html.innerHTML = '';
-
- var dsn = cur_frm.doc.customer_name;
- var dsa = cur_frm.doc.address;
- cl = new AddressList(cur_frm.shipping_html,dt,dn,dsn,dsa);
-}
-*/
-
-
// make history
// -------------
cur_frm.cscript.make_history = function(doc,dt,dn){
@@ -157,406 +120,4 @@
cur_frm.fields_dict['territory'].get_query = function(doc,dt,dn) {
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
}
-}
-
-
-// =======================================================================================================
-
-// contact list
-// --------------
-ContactList = function(parent,dt,dn,dsn){
-
- var me = this;
-
- this.dt = dt;
- this.dn = dn;
- this.dsn = dsn ? dsn : dn;
-
- this.wrapper = $a(parent,'div');
- me.get_list();
-}
-
-// add contact
-// ------------
-ContactList.prototype.add_contact = function(){
- var me = this;
-
- // onload - set default values
- var cont = LocalDB.create('Contact');
-
- var c = locals['Contact'][cont];
-
- if(me.dt == 'Customer') {
- c.is_customer = 1;
- c.customer = me.dn;
- c.customer_name = me.dsn;
- }
- else if(me.dt == 'Supplier'){
- c.is_supplier = 1;
- c.supplier = me.dn;
- c.supplier_name = me.dsn;
- }
- else if(me.dt == 'Sales Partner'){
- c.is_sales_partner = 1;
- c.sales_partner = me.dn;
- //c.sales_partner_name = me.dsn;
- }
-
- loaddoc('Contact',c.name);
-}
-
-// get contact list
-// -----------------
-ContactList.prototype.get_list = function(){
- var me = this;
-
- me.make_list();
-
- var dt = me.dt.toLowerCase().split(' ').join('_');
-
- // build query
- me.lst.get_query = function(){
- this.query = repl("select name, first_name, last_name, concat_ws(' ', first_name, last_name), email_id, contact_no, department, designation, is_primary_contact, has_login, disable_login from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
- this.query_max = repl("select count(name) from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
- }
-
- // render list ui
- me.lst.show_cell = function(cell,ri,ci,d){
- me.render_list(cell,ri,ci,d);
- }
-
- // run query
- me.lst.run();
-
- // onrun
- me.lst.onrun = function(){
- if(!this.has_data()){
- this.rec_label.innerHTML = '';
-
- $a(this.rec_label,'span').innerHTML = "You do not have any contact. ";
- $($a(this.rec_label,'span')).html('Add a new contact').addClass('link_type').click(function(){ me.add_contact(); });
-
- $dh(this.results);
- }
- else{
- $ds(this.results);
- }
- }
-}
-
-// make list
-// -----------
-ContactList.prototype.make_list = function(){
- var me = this;
-
- var l = new Listing();
- l.colwidths = ['5%','30%','30%','20%','20%'];
- l.colnames = ['Sr.','Contact Name','Email Id','Contact No', 'Action'];
- l.page_len = 10;
-
- me.lst = l;
-
- l.make(me.wrapper);
-
- // Add contact button
- me.add_btn = $btn(l.btn_area,'+ Add Contact', function(){ me.add_contact();}, {fontWeight:'bold'});
-}
-
-// make contact cell
-// ------------------
-ContactList.prototype.render_list = function(cell,ri,ci,d){
- var me = this;
-
- // name
- if(ci == 0){
- var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
- nm.innerHTML = d[ri][3];
- nm.id = d[ri][0];
-
- nm.onclick = function(){
- loaddoc('Contact', this.id);
-
- // on save callback - refresh list
- }
-
- // department and designation
- var des = d[ri][7] ? d[ri][7] : '';
- var dep = d[ri][6] ? d[ri][6] : '';
-
- var sp = $a(cell,'div','comment');
- sp.innerHTML = des + (dep ? (', ' + dep) : '');
- }
-
- // email id, contact no, department, designation
- // -----------------------------------------------------
- if(ci == 1) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
- if(ci == 2) cell.innerHTML = d[ri][5] ? d[ri][5] : '-';
-
- // actions
- // --------------------------------------
- if(ci== 3) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-ContactList.prototype.make_actions = function(cell,ri,ci,d){
- var me = this;
-
- var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
- // Edit and Delete
- var t = make_table($td(tab,0,0),1,2);
-
- var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
- $(edit).click(function(){ loaddoc('Contact',d[ri][0]); });
-
- edit.setAttribute('title','Edit');
-
-// Below code should be uncommented once customer/venodr invitation process is stable
-// ===========================================================================
-/*
- var del = $a($td(t,0,1),'div','wn-icon ic-trash');
- $(del).click(function(){ me.delete_contact(d[ri][0],d[ri][4]) });
-
- set_custom_tooltip(del, 'Delete');
-
- // Invite, Enable and Disable - Integrate after gateway logic incorporated
-
- if(d[ri][9] == 'Yes') {
- if(d[ri][10] == 'Yes'){
- var enb = $a($td(tab,0,1),'div','wn-icon ic-checkmark');
- $(enb).click(function(){ me.enable_login(d[ri][0], d[ri][4]); });
- }
- else{
- var dsb = $a($td(tab,0,1),'div','wn-icon ic-delete');
- $(dsb).click(function(){ me.disable_login(d[ri][0], d[ri][4]) });
- }
- }
- else{
- var inv = $a($td(tab,0,1),'div','wn-icon ic-mail');
- $(inv).click(function(){ me.invite_contact(d[ri][0], d[ri][4], d[ri][1], d[ri][2]) });
- }*/
-}
-
-// enable login
-// ----------------------------------------------------------
-ContactList.prototype.enable_login = function(id, email_id){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Login for contact enabled',1);
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
-
- $c_obj('Contact Control','enable_login',JSON.stringify(args),callback);
-}
-
-// disable login
-// -------------------------------------------------------------
-ContactList.prototype.disable_login = function(id, email_id){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Login for contact disabled',1);
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
-
- $c_obj('Contact Control','disable_login',JSON.stringify(args),callback);
-}
-
-// delete contact
-// -----------------
-ContactList.prototype.delete_contact = function(id,email_id,has_login){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Contact deleted successfully');
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
- args.has_login = has_login;
-
- $c_obj('Contact Control','delete_contact',JSON.stringify(args),callback);
-}
-
-// invite user
-// --------------------------------------------------------
-ContactList.prototype.invite_contact = function(id,email_id,first_name,last_name){
- var me = this;
-
- if(!email_id){
- msgprint("Please add email id and save the contact first. You can then invite contact to view transactions.")
- }
- else{
- var callback = function(r,rt){
- if(!r.exc) msgprint('Invitation sent');
- else errprint(r.exc);
- }
-
- var args = {
- 'contact' : id,
- 'email' : email_id,
- 'first_name' : first_name ? first_name : '',
- 'last_name' : last_name ? last_name : '',
- 'usert_type' : 'Partner'
- };
-
- $c_obj('Contact Control','invite_contact',JSON.stringify(args),callback);
- }
-}
-
-
-// address list
-// --------------
-AddressList = function(parent,dt,dn,dsn,dsa){
-
- var me = this;
-
- this.dt = dt;
- this.dn = dn;
- this.dsn = dsn ? dsn : dn;
- this.dsa = dsa ? dsa : '';
-
- this.wrapper = $a(parent,'div');
- me.get_addr_list();
-}
-
-
-// add contact
-// ------------
-AddressList.prototype.add_address = function(){
- var me = this;
-
- // onload - set default values
- var addr = LocalDB.create('Shipping Address');
-
- var a = locals['Shipping Address'][addr];
-
- a.customer = me.dn;
- a.customer_name = me.dsn;
- a.customer_address = me.dsa;
- loaddoc('Shipping Address',a.name);
-}
-
-
-// get address list
-// -----------------
-AddressList.prototype.get_addr_list = function(){
- var me = this;
-
- me.make_addr_list();
-
- var dt = me.dt.toLowerCase().split(' ').join('_');
-
- // build query
- me.lst.get_query = function(){
- this.query = repl("select name, ship_to, shipping_address, is_primary_address, shipping_details from `tabShipping Address` where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
- this.query_max = repl("select count(name) from `tabShipping Address` where %(dt)s = '%(dn)s'",{'dt':dt, 'dn':me.dn});
- }
-
- // render list ui
- me.lst.show_cell = function(cell,ri,ci,d){
- me.render_list(cell,ri,ci,d);
- }
-
- // run query
- me.lst.run();
-
- // onrun
- me.lst.onrun = function(){
- if(!this.has_data()){
- this.rec_label.innerHTML = '';
-
- $a(this.rec_label,'span').innerHTML = "You do not have any shipping address.";
- $($a(this.rec_label,'span')).html('Add a new address').addClass('link_type').click(function(){ me.add_address(); });
-
- $dh(this.results);
- }
- else{
- $ds(this.results);
- }
- }
-}
-
-
-// make list
-// -----------
-AddressList.prototype.make_addr_list = function(){
- var me = this;
-
- var l = new Listing();
- l.colwidths = ['5%', '15%', '25%','10%','35%','10%'];
- l.colnames = ['Sr.', 'Ship To', 'Shipping Address','Primary Address', 'Shipping Details', 'Action'];
- l.page_len = 10;
-
- me.lst = l;
-
- l.make(me.wrapper);
-
- // Add address button
- me.add_btn = $btn(l.btn_area,'+ Add Address', function(){ me.add_address();}, {fontWeight:'bold'});
-}
-
-
-
-// make address cell
-// ------------------
-AddressList.prototype.render_list = function(cell,ri,ci,d){
- var me = this;
-
- // name
- if(ci == 0){
- var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
- nm.innerHTML = d[ri][1];
- nm.id = d[ri][0];
-
- nm.onclick = function(){
- loaddoc('Shipping Address', this.id);
- }
- }
-
- // shipping address, primary address, shipping details
- // ----------------------------------------------------
- if(ci == 1) cell.innerHTML = d[ri][2] ? d[ri][2] : '-';
- if(ci == 2) cell.innerHTML = d[ri][3] ? d[ri][3] : '-';
- if(ci == 3) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
-
- // actions
- // --------------------------------------
- if(ci== 4) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-AddressList.prototype.make_actions = function(cell,ri,ci,d){
- var me = this;
-
- var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
- // Edit and Delete
- var t = make_table($td(tab,0,0),1,2);
-
- var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
- $(edit).click(function(){ loaddoc('Shipping Address',d[ri][0]); });
-
- edit.setAttribute('title','Edit');
-}
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/manage_account/manage_account.txt b/erpnext/setup/doctype/manage_account/manage_account.txt
index 18a9872..4077afe 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.txt
+++ b/erpnext/setup/doctype/manage_account/manage_account.txt
@@ -231,7 +231,7 @@
'doctype': 'DocField',
'fieldtype': 'HTML',
'label': 'IGHelp',
- 'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Item Group\');">To manage Item Groups, click here</a>'
+ 'options': '<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
},
# DocField
@@ -391,7 +391,7 @@
'doctype': 'DocField',
'fieldtype': 'HTML',
'label': 'CGHelp',
- 'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Customer Group\');">To manage Customer Groups, click here</a>'
+ 'options': '<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
},
# DocField
@@ -408,7 +408,7 @@
'doctype': 'DocField',
'fieldtype': 'HTML',
'label': 'TerritoryHelp',
- 'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Territory\');">To manage Territory, click here</a>'
+ 'options': '<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
},
# DocField
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index 1194756..30ab18a 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-$import(Contact Control)
+wn.require('erpnext/setup/doctype/contact_control/contact_control.js');
cur_frm.cscript.onload = function(doc,dt,dn){
// history doctypes and scripts
@@ -48,18 +48,10 @@
cur_frm.cscript.make_address = function() {
if(!cur_frm.address_list) {
- cur_frm.address_list = new wn.widgets.Listing({
+ cur_frm.address_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Address HTML'].wrapper,
page_length: 2,
- new_doctype: "Address",
- new_doc_onload: function(dn) {
- ndoc = locals["Address"][dn];
- ndoc.sales_partner = cur_frm.doc.name;
- ndoc.address_type = 'Office';
- },
- new_doc_onsave: function(dn) {
- cur_frm.address_list.run()
- },
+ new_doctype: "Address",
get_query: function() {
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
@@ -80,17 +72,10 @@
cur_frm.cscript.make_contact = function() {
if(!cur_frm.contact_list) {
- cur_frm.contact_list = new wn.widgets.Listing({
+ cur_frm.contact_list = new wn.ui.Listing({
parent: cur_frm.fields_dict['Contact HTML'].wrapper,
page_length: 2,
new_doctype: "Contact",
- new_doc_onload: function(dn) {
- ndoc = locals["Contact"][dn];
- ndoc.sales_partner = cur_frm.doc.name;
- },
- new_doc_onsave: function(dn) {
- cur_frm.contact_list.run()
- },
get_query: function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
diff --git a/erpnext/setup/doctype/sales_person/sales_person.txt b/erpnext/setup/doctype/sales_person/sales_person.txt
index 0680c38..9ae96bf 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.txt
+++ b/erpnext/setup/doctype/sales_person/sales_person.txt
@@ -183,7 +183,7 @@
'idx': 5,
'label': 'SPHelp',
'oldfieldtype': 'HTML',
- 'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Sales Person\');">To manage Sales Person, click here</a>',
+ 'options': '<a href="#!Sales Browser/Sales Person">To manage Sales Person, click here</a>',
'permlevel': 0
},
diff --git a/erpnext/setup/page/import_data/import_data.js b/erpnext/setup/page/import_data/import_data.js
index aeb7dad..734c16d 100644
--- a/erpnext/setup/page/import_data/import_data.js
+++ b/erpnext/setup/page/import_data/import_data.js
@@ -47,7 +47,7 @@
dt.onclick = function(){
var ovr = $('input[name="overwrite"]:checked').length;
- window.location = outUrl + '?cmd=get_template&dt=' + this.nm + (ovr ? '&overwrite=1' : '');
+ window.location = wn.request.url + '?cmd=get_template&dt=' + this.nm + (ovr ? '&overwrite=1' : '');
}
}
}
diff --git a/erpnext/setup/page/modules_setup/modules_setup.js b/erpnext/setup/page/modules_setup/modules_setup.js
index af7522f..c7f80fc 100644
--- a/erpnext/setup/page/modules_setup/modules_setup.js
+++ b/erpnext/setup/page/modules_setup/modules_setup.js
@@ -1,4 +1,4 @@
-wn.require('lib/js/lib/jquery-ui-sortable.min.js');
+wn.require('lib/js/lib/jquery/jquery.ui.sortable.js');
$.extend(wn.pages.modules_setup, {
modules: ['Activity', 'Accounts', 'Selling', 'Buying', 'Stock', 'Production', 'Projects',
diff --git a/erpnext/setup/page/setup/setup.html b/erpnext/setup/page/setup/setup.html
index 50ef112..056a28f 100644
--- a/erpnext/setup/page/setup/setup.html
+++ b/erpnext/setup/page/setup/setup.html
@@ -31,10 +31,6 @@
<b><a href="#!List/Authorization Rule">Amount based Authorization Rules</a></b><br>
<span class="help">Restrict submission rights based on amount</span>
</p>
- <p>
- <b><a href="#!modules_setup">Modules Setup</a></b><br>
- <span class="help">Show, hide modules</span>
- </p>
</div>
<div class="setup-column">
<h3>Data</h3>
@@ -85,21 +81,29 @@
<div class="setup-column">
<h3>Customize ERPNext</h3>
<p>
- <b><a href="#!List/Custom Field">Custom Fields</a></b><br>
- <span class="help">Add fields to forms</span>
- </p>
- <p>
<b><a href="#!Form/DocLayer/DocLayer">Customize Forms</a></b><br>
<span class="help">Change entry properties (hide fields, make mandatory etc)</span>
</p>
<p>
- <b><a href="#!Form/Naming Series/Naming Series">Numbering Series</a></b><br>
- <span class="help">Set multiple numbering series for transactions</span>
+ <b><a href="#!List/Custom Field">Custom Fields</a></b><br>
+ <span class="help">Add fields to forms</span>
+ </p>
+ <p>
+ <b><a href="#!List/Custom Script">Custom Scripts</a></b><br>
+ <span class="help">Add custom code to forms</span>
</p>
<p>
<b><a href="#!Form/Features Setup/Features Setup">Disable Features</a></b><br>
<span class="help">Simplify entry forms by disabling features</span>
</p>
+ <p>
+ <b><a href="#!modules_setup">Modules Setup</a></b><br>
+ <span class="help">Show, hide modules</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Naming Series/Naming Series">Numbering Series</a></b><br>
+ <span class="help">Set multiple numbering series for transactions</span>
+ </p>
</div>
<div class="setup-column">
<h3>Branding and Printing</h3>
@@ -115,14 +119,16 @@
<b><a href="#!List/Print Heading">Print Headings</a></b><br>
<span class="help">Add headers for standard print formats</span>
</p>
+ <!--
<p>
<b><a href="#!Form/Personalize/Personalize">Home Banner</a></b><br>
<span class="help">Add a home page banner</span>
</p>
+ -->
<p>
<b><a href="#!Form/Style Settings/Style Settings">Style Settings</a></b><br>
<span class="help">Change background fonts etc</span>
</p>
</div>
<div style="clear: both"></div>
-</div>
\ No newline at end of file
+</div>
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index 107a5d7..e5846b5 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -89,6 +89,7 @@
import webnotes.model.doctype
bootinfo['docs'] += webnotes.model.doctype.get('Event')
+ bootinfo['docs'] += webnotes.model.doctype.get('Search Criteria')
bootinfo['modules_list'] = webnotes.conn.get_global('modules_list')
diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js
index ac89aff..c643813 100644
--- a/erpnext/startup/js/complete_setup.js
+++ b/erpnext/startup/js/complete_setup.js
@@ -85,7 +85,7 @@
wn.boot.user_info[user].fullname = user_fullname;
d.hide();
$('header').toggle(true);
- page_body.wntoolbar.set_user_name();
+ wn.container.wntoolbar.set_user_name();
});
}
diff --git a/erpnext/startup/js/modules.js b/erpnext/startup/js/modules.js
index d43b021..2e0e701 100644
--- a/erpnext/startup/js/modules.js
+++ b/erpnext/startup/js/modules.js
@@ -61,7 +61,7 @@
erpnext.module_page.make_list = function(module, wrapper) {
// make project listing
- wrapper.list = new wn.widgets.Listing({
+ wrapper.list = new wn.ui.Listing({
parent: $(wrapper).find('.reports-list').get(0),
method: 'utilities.get_report_list',
render_row: function(row, data) {
diff --git a/erpnext/startup/js/toolbar.js b/erpnext/startup/js/toolbar.js
index 7bf9c6a..eb3bff8 100644
--- a/erpnext/startup/js/toolbar.js
+++ b/erpnext/startup/js/toolbar.js
@@ -48,7 +48,7 @@
$('#toolbar-user').append('<li><a href="#billing">Billing</a></li>')
}
- $.extend(page_body.wntoolbar, {
+ $.extend(wn.container.wntoolbar, {
set_new_comments: function(new_comments) {
var navbar_nc = $('.navbar-new-comments');
if(new_comments && new_comments.length>0) {
@@ -66,7 +66,7 @@
}
});
- page_body.wntoolbar.set_new_comments();
+ wn.container.wntoolbar.set_new_comments();
}
erpnext.toolbar.add_modules = function() {
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 225e444..2735ffe 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -1,11 +1,11 @@
h1, h2, h3, h4, h5 {
- font-family: Tahoma, Arial, Verdana, sans-serif;
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
font-weight: bold;
}
body {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
- font-size: 12px;
+ font-family: "Lato", Helvetica, "Helvetica Neue", sans-serif;
+ font-size: 13px;
}
span, div, td, input, textarea, button, select {
@@ -13,7 +13,11 @@
}
body {
- background: url(../images/stripedbg.png) repeat;
+ background: url(../images/redbeech.jpg) repeat;
+}
+
+.small {
+ font-size: 11.5px;
}
.erpnext-footer {
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index c00770c..925c85e 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -49,14 +49,14 @@
erpnext.startup.set_globals();
- if(wn.boot.custom_css) {
- set_style(wn.boot.custom_css);
- }
if(wn.boot.user_background) {
erpnext.set_user_background(wn.boot.user_background);
}
if(user == 'Guest'){
+ if(wn.boot.custom_css) {
+ set_style(wn.boot.custom_css);
+ }
if(wn.boot.website_settings.title_prefix) {
wn.title_prefix = wn.boot.website_settings.title_prefix;
}
@@ -73,8 +73,8 @@
// border to the body
// ------------------
- $('footer').html('<div class="web-footer erpnext-footer">\
- <a href="#!attributions">ERPNext | Attributions and License</a></div>');
+ //$('footer').html('<div class="web-footer erpnext-footer">\
+ // <a href="#!attributions">ERPNext | Attributions and License</a></div>');
// complete registration
if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {
@@ -107,14 +107,14 @@
var update_messages = function(reset) {
// Updates Team Messages
- if(inList(['Guest'], user)) { return; }
+ if(inList(['Guest'], user) || !wn.session_alive) { return; }
if(!reset) {
$c_page('home', 'event_updates', 'get_global_status_messages', null,
function(r,rt) {
if(!r.exc) {
// This function is defined in toolbar.js
- page_body.wntoolbar.set_new_comments(r.message.unread_messages);
+ wn.container.wntoolbar.set_new_comments(r.message.unread_messages);
var show_in_circle = function(parent_id, msg) {
var parent = $('#'+parent_id);
@@ -139,7 +139,7 @@
}
);
} else {
- page_body.wntoolbar.set_new_comments(0);
+ wn.container.wntoolbar.set_new_comments(0);
$('#unread_messages').toggle(false);
}
}
diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index e3f0dc9..d628495 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:35',
'docstatus': 0,
- 'modified': '2012-03-01 17:58:16',
+ 'modified': '2012-03-20 14:24:12',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/stock/Module Def/Stock/Stock.txt b/erpnext/stock/Module Def/Stock/Stock.txt
deleted file mode 100644
index 991d410..0000000
--- a/erpnext/stock/Module Def/Stock/Stock.txt
+++ /dev/null
@@ -1,242 +0,0 @@
-# Module Def, Stock
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:40:49',
- 'docstatus': 0,
- 'modified': '2012-02-01 15:43:00',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Stock',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Stock',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'doctype_list': 'DocType Label, QA Inspection Report',
- 'is_hidden': 'No',
- 'module_desc': 'Material Management',
- 'module_icon': 'Stock.gif',
- 'module_label': 'Stock',
- 'module_name': 'Stock',
- 'module_seq': 7,
- 'name': '__common__'
- },
-
- # Module Def, Stock
- {
- 'doctype': u'Module Def',
- 'name': 'Stock'
- },
-
- # Module Def Item
- {
- 'description': 'Item master',
- 'display_name': 'Item',
- 'doc_name': 'Item',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'name\nitem_group\ndescription'
- },
-
- # Module Def Item
- {
- 'description': 'A unique number identifying each entity of an item',
- 'display_name': 'Serial No',
- 'doc_name': 'Serial No',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'item_code\nstatus\nwarehouse\npr_no\ndelivery_note_no\ncustomer'
- },
-
- # Module Def Item
- {
- 'description': 'Record of items added, removed or moved from one warehouse to another.',
- 'display_name': 'Stock Entry',
- 'doc_name': 'Stock Entry',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'transfer_date\npurpose\nfrom_warehouse\nto_warehouse\nremarks'
- },
-
- # Module Def Item
- {
- 'description': 'Record of items delivered to your customers along with the Printed Note',
- 'display_name': 'Delivery Note',
- 'doc_name': 'Delivery Note',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\ncustomer\nterritory\ngrand_total\nper_billed'
- },
-
- # Module Def Item
- {
- 'description': 'Generate Packing Slips based on a Delivery Note',
- 'display_name': 'Packing Slip',
- 'doc_name': 'Packing Slip',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'delivery_note\nfrom_case_no\nto_case_no\nnet_weight_pkg\ngross_weight_pkg'
- },
-
- # Module Def Item
- {
- 'description': 'Record of incoming material from your suppliers',
- 'display_name': 'Purchase Receipt',
- 'doc_name': 'Purchase Receipt',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\nsupplier\ngrand_total\nper_billed'
- },
-
- # Module Def Item
- {
- 'description': 'Details of Installation done after delivery',
- 'display_name': 'Installation Note',
- 'doc_name': 'Installation Note',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Create Quality Inspection Report for any item',
- 'display_name': 'Inspection Report',
- 'doc_name': 'QA Inspection Report',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'inspection_type\nitem_code\nreport_date\npurchase_receipt_no\ndelivery_note_no'
- },
-
- # Module Def Item
- {
- 'description': 'Reconcile your stock by uploading it form an excel file',
- 'display_name': 'Stock Reconciliation',
- 'doc_name': 'Stock Reconciliation',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'reconciliation_date\nreconciliation_time\nremark'
- },
-
- # Module Def Item
- {
- 'description': 'This utility tool will update Stock UOM in Item and will respectively update Actual Qty in Stock Ledger as per Conversion Factor.',
- 'display_name': 'Stock UOM Replace Utility',
- 'doc_name': 'Stock UOM Replace Utility',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'This utility will help in tracking stock for Sales Return and Purchase Return.',
- 'display_name': 'Sales and Purchase Return Wizard',
- 'doc_name': 'Sales and Purchase Return Wizard',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'You can create master template for landed cost wizard',
- 'display_name': 'Landed Cost Master',
- 'doc_name': 'Landed Cost Master',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'icon': 'accept.gif'
- },
-
- # Module Def Item
- {
- 'description': 'Add extra expenses into Purchase Receipt which should be consider for item valuation. The cost will be added proportionately as per purchase receipt value.',
- 'display_name': 'Landed Cost Wizard',
- 'doc_name': 'Landed Cost Wizard',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'icon': 'accept.gif'
- },
-
- # Module Def Item
- {
- 'display_name': 'Stock Ledger',
- 'doc_name': 'Stock Ledger Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Stock Level',
- 'doc_name': 'Bin',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Shortage To Indent',
- 'doc_name': 'Item',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'Stock Value as per Item and Warehouse',
- 'display_name': 'Stock Report',
- 'doc_name': 'Stock Ledger Entry',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Stock Aging Report',
- 'doc_name': 'Serial No',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Material User'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Material Master Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Material Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Quality Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 1f5170b..95bd7bf 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -20,9 +20,10 @@
cur_frm.cscript.other_fname = "other_charges";
cur_frm.cscript.sales_team_fname = "sales_team";
-$import(Sales Common)
-$import(Other Charges)
-$import(SMS Control)
+wn.require('erpnext/selling/doctype/sales_common/sales_common.js');
+wn.require('erpnext/setup/doctype/other_charges/other_charges.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
// ONLOAD
// ================================================================================================
@@ -81,11 +82,11 @@
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
var callback = function(r,rt) {
var doc = locals[cur_frm.doctype][cur_frm.docname];
+ if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
cur_frm.refresh();
}
var args = onload ? 'onload':''
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback);
- if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@@ -322,7 +323,6 @@
return out;
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Delivery Note',
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 314d0d9..4878c36 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -31,11 +31,11 @@
'module': u'Stock',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total',
+ 'search_fields': u'status,customer,customer_name, territory,grand_total',
'section_style': u'Tabbed',
'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
+ 'subject': u'To %(customer_name)s on %(posting_date)s | %(per_billed)s% billed',
'tag_fields': u'billing_status',
'version': 475
},
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 7ad9d91..921eede 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -18,9 +18,10 @@
cur_frm.cscript.fname = "purchase_receipt_details";
cur_frm.cscript.other_fname = "purchase_tax_details";
-$import(Purchase Common)
-$import(Purchase Other Charges)
-$import(SMS Control)
+wn.require('erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js');
+wn.require('erpnext/buying/doctype/purchase_common/purchase_common.js');
+wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
+wn.require('erpnext/setup/doctype/notification_control/notification_control.js');
//========================== On Load ================================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
@@ -315,7 +316,6 @@
return out;
}
-$import(Notification Control)
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
var args = {
type: 'Purchase Receipt',
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 525bcfc..6724b69 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -21,11 +21,11 @@
'module': u'Stock',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': u'status, transaction_date, supplier',
+ 'search_fields': u'status, posting_date, supplier',
'section_style': u'Tabbed',
'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s',
+ 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s',
'version': 325
},
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 1e558c9..07e83ed 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -22,13 +22,17 @@
var cfn_set_fields = function(doc, cdt, cdn) {
- lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address'];
- if (doc.purpose == 'Production Order'){
- unhide_field(['production_order', 'process', 'Get Items']);
- hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML']);
- doc.from_warehouse = '';
+ lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address'];
+ hide_field(lst);
+
+ if (doc.purpose == 'Production Order' || doc.purpose == 'Other'){
+ unhide_field('Get Items');
+ hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML', 'transporter', 'is_excisable_goods', 'excisable_goods']);
+ if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']);
+
+ doc.from_warehouse = '';
doc.to_warehosue = '';
- if (doc.process == 'Backflush'){
+ if (doc.process == 'Backflush' || doc.purpose == 'Other'){
unhide_field('fg_completed_qty');
}
else{
@@ -39,7 +43,6 @@
else{
unhide_field(['from_warehouse', 'to_warehouse']);
hide_field(['production_order', 'process', 'Get Items', 'fg_completed_qty','purchase_receipt_no','delivery_note_no', 'sales_invoice_no']);
- hide_field(lst);
doc.production_order = '';
doc.process = '';
doc.fg_completed_qty = 0;
@@ -48,12 +51,10 @@
if(doc.purpose == 'Purchase Return'){
doc.customer=doc.customer_name = doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no='';
- hide_field(lst);
unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']);
}
else if(doc.purpose == 'Sales Return'){
doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
- hide_field(lst);
unhide_field(['customer','customer_name','customer_address','delivery_note_no', 'sales_invoice_no']);
} else{
doc.customer=doc.customer_name=doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
@@ -110,6 +111,7 @@
+'AND ifnull(`tabBin`.`actual_qty`,0) > 0 '
+'AND tabBin.warehouse="'+ d.s_warehouse +'" '
+'AND tabItem.docstatus < 2 '
+ +'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
@@ -117,6 +119,7 @@
return 'SELECT tabItem.name, tabItem.description '
+'FROM tabItem '
+'WHERE tabItem.docstatus < 2 '
+ +'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") '
+'AND tabItem.%(key)s LIKE "%s" '
+'ORDER BY tabItem.name ASC '
+'LIMIT 50'
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 530c5e6..96642d0 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -157,13 +157,13 @@
- def get_raw_materials(self,pro_obj):
+ def get_raw_materials(self, bom_no, fg_qty, consider_sa_items_as_rm):
"""
get all items from flat bom except
child items of sub-contracted and sub assembly items
and sub assembly items itself.
"""
- if pro_obj.doc.consider_sa_items == 'Yes':
+ if consider_sa_items_as_rm == 'Yes':
# Get all raw materials considering SA items as raw materials,
# so no childs of SA items
fl_bom_sa_items = sql("""
@@ -171,8 +171,7 @@
from `tabBOM Material`
where parent = '%s' and docstatus < 2
group by item_code
- """ % ((self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) \
- or flt(pro_obj.doc.qty), cstr(pro_obj.doc.bom_no)))
+ """ % (fg_qty, bom_no))
self.make_items_dict(fl_bom_sa_items)
@@ -189,8 +188,7 @@
and ifnull(it.is_sub_contracted_item, 'No') = 'No' and fb.docstatus<2 and fb.parent=%s
) a
group by item_code,stock_uom
- """ , ((self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) \
- or flt(pro_obj.doc.qty), cstr(pro_obj.doc.bom_no)))
+ """ , (fg_qty, bom_no))
self.make_items_dict(fl_bom_sa_child_item)
# Update only qty remaining to be issued for production
@@ -199,17 +197,11 @@
- def add_to_stock_entry_detail(self, pro_obj, item_dict, fg_item = 0):
- sw, tw = '', ''
- if self.doc.process == 'Material Transfer':
- tw = cstr(pro_obj.doc.wip_warehouse)
- if self.doc.process == 'Backflush':
- tw = fg_item and cstr(pro_obj.doc.fg_warehouse) or ''
- if not fg_item: sw = cstr(pro_obj.doc.wip_warehouse)
+ def add_to_stock_entry_detail(self, source_wh, target_wh, item_dict, fg_item = 0, bom_no = ''):
for d in item_dict:
se_child = addchild(self.doc, 'mtn_details', 'Stock Entry Detail', 0, self.doclist)
- se_child.s_warehouse = sw
- se_child.t_warehouse = tw
+ se_child.s_warehouse = source_wh
+ se_child.t_warehouse = target_wh
se_child.fg_item = fg_item
se_child.item_code = cstr(d)
se_child.description = item_dict[d][1]
@@ -219,24 +211,52 @@
se_child.qty = flt(item_dict[d][0])
se_child.transfer_qty = flt(item_dict[d][0])
se_child.conversion_factor = 1.00
- if fg_item: se_child.bom_no = pro_obj.doc.bom_no
+ if fg_item: se_child.bom_no = bom_no
+
+ def validate_bom_no(self):
+ if self.doc.bom_no:
+ if not self.doc.fg_completed_qty:
+ msgprint("Please enter FG Completed Qty", raise_exception=1)
+ if not self.doc.consider_sa_items_as_raw_materials:
+ msgprint("Please confirm whether you want to consider sub assembly item as raw materials", raise_exception=1)
# get items
#------------------
def get_items(self):
- pro_obj = self.doc.production_order and get_obj('Production Order', self.doc.production_order) or ''
-
- self.validate_for_production_order(pro_obj)
- self.get_raw_materials(pro_obj)
-
+ if self.doc.purpose == 'Production Order':
+ pro_obj = self.doc.production_order and get_obj('Production Order', self.doc.production_order) or ''
+ self.validate_for_production_order(pro_obj)
+
+ bom_no = pro_obj.doc.bom_no
+ fg_qty = (self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) or flt(pro_obj.doc.qty)
+ consider_sa_items_as_rm = pro_obj.doc.consider_sa_items
+ elif self.doc.purpose == 'Other':
+ self.validate_bom_no()
+ bom_no = self.doc.bom_no
+ fg_qty = self.doc.fg_completed_qty
+ consider_sa_items_as_rm = self.doc.consider_sa_items_as_raw_materials
+
+ self.get_raw_materials(bom_no, fg_qty, consider_sa_items_as_rm)
self.doc.clear_table(self.doclist, 'mtn_details', 1)
- self.add_to_stock_entry_detail(pro_obj, self.item_dict)
-
+ sw = (self.doc.process == 'Backflush') and cstr(pro_obj.doc.wip_warehouse) or ''
+ tw = (self.doc.process == 'Material Transfer') and cstr(pro_obj.doc.wip_warehouse) or ''
+ self.add_to_stock_entry_detail(sw, tw, self.item_dict)
+
+ fg_item_dict = {}
if self.doc.process == 'Backflush':
- item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
- self.add_to_stock_entry_detail(pro_obj, item_dict, fg_item = 1)
+ sw = ''
+ tw = cstr(pro_obj.doc.fg_warehouse)
+ fg_item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
+ elif self.doc.purpose == 'Other' and self.doc.bom_no:
+ sw, tw = '', ''
+ item = sql("select item, description, uom from `tabBill Of Materials` where name = %s", self.doc.bom_no, as_dict=1)
+ fg_item_dict = {item[0]['item'] : [self.doc.fg_completed_qty, item[0]['description'], item[0]['uom']]}
+
+ if fg_item_dict:
+ self.add_to_stock_entry_detail(sw, tw, fg_item_dict, fg_item = 1, bom_no = bom_no)
+
def validate_transfer_qty(self):
@@ -289,7 +309,7 @@
def validate_for_production_order(self, pro_obj):
- if self.doc.purpose == 'Production Order' or self.doc.process or self.doc.production_order or flt(self.doc.fg_completed_qty):
+ if self.doc.purpose == 'Production Order' or self.doc.process or self.doc.production_order:
if self.doc.purpose != 'Production Order':
msgprint("Purpose should be 'Production Order'.")
raise Exception
@@ -394,7 +414,6 @@
if cstr(pro_obj.doc.production_item) != cstr(d.item_code):
msgprint("Item %s in Stock Entry Detail as Row No %s do not match with Item %s in Production Order %s" % (cstr(d.item_code), cstr(d.idx), cstr(pro_obj.doc.production_item), cstr(pro_obj.doc.name)))
raise Exception
- fg_qty = flt(fg_qty) + flt(d.transfer_qty)
if cstr(d.t_warehouse) != cstr(pro_obj.doc.fg_warehouse):
msgprint("As Item %s is FG Item. Target Warehouse should be same as FG Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.fg_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
raise Exception
@@ -408,6 +427,9 @@
if cstr(d.s_warehouse) != cstr(pro_obj.doc.wip_warehouse):
msgprint("As Item %s is Raw Material. Source Warehouse should be same as WIP Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
raise Exception
+ if d.fg_item and (self.doc.purpose == 'Other' or self.doc.process == 'Backflush'):
+ fg_qty = flt(fg_qty) + flt(d.transfer_qty)
+
d.save()
if self.doc.fg_completed_qty and flt(self.doc.fg_completed_qty) != flt(fg_qty):
msgprint("The Total of FG Qty %s in Stock Entry Detail do not match with FG Completed Qty %s" % (flt(fg_qty), flt(self.doc.fg_completed_qty)))
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt
index 395082f..9792fc9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.txt
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt
@@ -5,22 +5,22 @@
{
'creation': '2010-08-08 17:09:25',
'docstatus': 0,
- 'modified': '2012-01-24 19:47:47',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-21 11:00:48',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1325570647',
+ '_last_update': u'1332233897',
'allow_attach': 0,
'allow_copy': 0,
'allow_email': 0,
'allow_print': 0,
'allow_rename': 0,
'allow_trash': 0,
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'hide_heading': 0,
'hide_toolbar': 0,
@@ -29,44 +29,44 @@
'is_transaction_doc': 0,
'issingle': 0,
'max_attachments': 0,
- 'module': 'Stock',
+ 'module': u'Stock',
'name': '__common__',
- 'print_outline': 'No',
+ 'print_outline': u'No',
'read_only': 0,
'read_only_onload': 0,
- 'search_fields': 'transfer_date, from_warehouse, to_warehouse, purpose, remarks',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'transfer_date, from_warehouse, to_warehouse, purpose, remarks',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': '%(remarks)s',
- 'tag_fields': 'purpose',
+ 'subject': u'%(remarks)s',
+ 'tag_fields': u'purpose',
'use_template': 0,
- 'version': 248
+ 'version': 259
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Stock Entry',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Stock Entry',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Stock Entry',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Stock Entry',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Stock Entry
{
'doctype': 'DocType',
- 'name': 'Stock Entry'
+ 'name': u'Stock Entry'
},
# DocPerm
@@ -74,9 +74,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Material Manager',
+ 'role': u'Material Manager',
'submit': 0,
'write': 0
},
@@ -86,9 +86,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 0,
'write': 0
},
@@ -98,9 +98,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Production User',
+ 'role': u'Production User',
'submit': 1,
'write': 1
},
@@ -110,9 +110,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Production User',
+ 'role': u'Production User',
'submit': 0,
'write': 0
},
@@ -122,9 +122,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'Production User',
+ 'role': u'Production User',
'submit': 0,
'write': 1
},
@@ -134,9 +134,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Production Manager',
+ 'role': u'Production Manager',
'submit': 1,
'write': 1
},
@@ -146,9 +146,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Production Manager',
+ 'role': u'Production Manager',
'submit': 0,
'write': 0
},
@@ -158,45 +158,45 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'Production Manager',
+ 'role': u'Production Manager',
'submit': 0,
'write': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Warehouse',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Warehouse',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
'in_filter': 0,
- 'label': 'Series',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': 'STE',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'STE',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -207,15 +207,15 @@
# DocField
{
'allow_on_submit': 0,
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
'in_filter': 0,
- 'label': 'Amendment Date',
+ 'label': u'Amendment Date',
'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -225,73 +225,73 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'purpose',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'purpose',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Purpose',
+ 'label': u'Purpose',
'no_copy': 0,
- 'oldfieldname': 'purpose',
- 'oldfieldtype': 'Select',
- 'options': 'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order',
+ 'oldfieldname': u'purpose',
+ 'oldfieldtype': u'Select',
+ 'options': u'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther',
'permlevel': 0,
'report_hide': 0,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'delivery_note_no',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_note_no',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 0,
- 'label': 'Delivery Note No',
+ 'label': u'Delivery Note No',
'no_copy': 0,
- 'oldfieldname': 'delivery_note_no',
- 'oldfieldtype': 'Link',
- 'options': 'Delivery Note',
+ 'oldfieldname': u'delivery_note_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Delivery Note',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_receipt_no',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_receipt_no',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 0,
- 'label': 'Purchase Receipt No',
+ 'label': u'Purchase Receipt No',
'no_copy': 0,
- 'oldfieldname': 'purchase_receipt_no',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Receipt',
+ 'oldfieldname': u'purchase_receipt_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Receipt',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'sales_invoice_no',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_invoice_no',
+ 'fieldtype': u'Link',
'hidden': 1,
- 'label': 'Sales Invoice No',
- 'options': 'Receivable Voucher',
+ 'label': u'Sales Invoice No',
+ 'options': u'Receivable Voucher',
'permlevel': 0,
'print_hide': 1
},
@@ -299,35 +299,35 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'supplier',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 0,
- 'label': 'Supplier',
+ 'label': u'Supplier',
'no_copy': 0,
- 'oldfieldname': 'supplier',
- 'oldfieldtype': 'Link',
- 'options': 'Supplier',
+ 'oldfieldname': u'supplier',
+ 'oldfieldtype': u'Link',
+ 'options': u'Supplier',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'supplier_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_name',
+ 'fieldtype': u'Data',
'in_filter': 0,
- 'label': 'Supplier Name',
+ 'label': u'Supplier Name',
'no_copy': 0,
- 'oldfieldname': 'supplier_name',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'supplier_name',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'report_hide': 0,
'search_index': 0
@@ -336,55 +336,55 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'supplier_address',
- 'fieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_address',
+ 'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0,
- 'label': 'Supplier Address',
+ 'label': u'Supplier Address',
'no_copy': 0,
- 'oldfieldname': 'supplier_address',
- 'oldfieldtype': 'Small Text',
+ 'oldfieldname': u'supplier_address',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'report_hide': 0,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'customer',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 0,
- 'label': 'Customer',
+ 'label': u'Customer',
'no_copy': 0,
- 'oldfieldname': 'customer',
- 'oldfieldtype': 'Link',
- 'options': 'Customer',
+ 'oldfieldname': u'customer',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 0,
- 'label': 'Customer Name',
+ 'label': u'Customer Name',
'no_copy': 0,
- 'oldfieldname': 'customer_name',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'customer_name',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'report_hide': 0,
'search_index': 0
@@ -393,15 +393,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'customer_address',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_address',
+ 'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0,
- 'label': 'Customer Address',
+ 'label': u'Customer Address',
'no_copy': 0,
- 'oldfieldname': 'customer_address',
- 'oldfieldtype': 'Small Text',
+ 'oldfieldname': u'customer_address',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'report_hide': 0,
'search_index': 0
@@ -410,153 +410,177 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'process',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'process',
+ 'fieldtype': u'Select',
'hidden': 1,
'in_filter': 1,
- 'label': 'Process',
+ 'label': u'Process',
'no_copy': 0,
- 'oldfieldname': 'process',
- 'oldfieldtype': 'Select',
- 'options': '\nMaterial Transfer\nBackflush',
+ 'oldfieldname': u'process',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nMaterial Transfer\nBackflush',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'production_order',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'production_order',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
- 'label': 'Production Order',
+ 'label': u'Production Order',
'no_copy': 0,
- 'oldfieldname': 'production_order',
- 'oldfieldtype': 'Link',
- 'options': 'Production Order',
+ 'oldfieldname': u'production_order',
+ 'oldfieldtype': u'Link',
+ 'options': u'Production Order',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'fg_completed_qty',
- 'fieldtype': 'Currency',
- 'in_filter': 0,
- 'label': 'FG Completed Qty',
- 'no_copy': 0,
- 'oldfieldname': 'fg_completed_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 0,
- 'search_index': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Warehouse HTML',
- 'no_copy': 0,
- 'oldfieldtype': 'HTML',
- 'options': "<div class='columnHeading'>Warehouse</div>",
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'from_warehouse',
- 'fieldtype': 'Link',
- 'in_filter': 0,
- 'label': 'Source Warehouse',
- 'no_copy': 0,
- 'oldfieldname': 'from_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 0,
- 'reqd': 0,
- 'search_index': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'description': '<b>Notes:</b> Either Source or Target is Mandatory',
- 'doctype': 'DocField',
- 'fieldname': 'to_warehouse',
- 'fieldtype': 'Link',
- 'in_filter': 0,
- 'label': 'Target Warehouse',
- 'no_copy': 0,
- 'oldfieldname': 'to_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 0,
- 'reqd': 0,
- 'search_index': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Link',
- 'options': 'Project',
+ 'depends_on': u"eval:doc.purpose == 'Other'",
+ 'doctype': u'DocField',
+ 'fieldname': u'bom_no',
+ 'fieldtype': u'Link',
+ 'label': u'BOM No',
+ 'options': u'Bill Of Materials',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
+ 'colour': u'White:FFF',
+ 'depends_on': u"eval:doc.purpose == 'Other'",
+ 'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.',
+ 'doctype': u'DocField',
+ 'fieldname': u'consider_sa_items_as_raw_materials',
+ 'fieldtype': u'Select',
+ 'label': u'Consider SA Items as Raw Materials',
+ 'options': u'\nNo\nYes',
+ 'permlevel': 0
},
# DocField
{
'allow_on_submit': 0,
- 'default': 'Today',
- 'doctype': 'DocField',
- 'fieldname': 'transfer_date',
- 'fieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'fg_completed_qty',
+ 'fieldtype': u'Currency',
+ 'in_filter': 0,
+ 'label': u'FG Completed Qty',
+ 'no_copy': 0,
+ 'oldfieldname': u'fg_completed_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 0,
+ 'search_index': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Warehouse HTML',
+ 'no_copy': 0,
+ 'oldfieldtype': u'HTML',
+ 'options': u"<div class='columnHeading'>Warehouse</div>",
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 0,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'from_warehouse',
+ 'fieldtype': u'Link',
+ 'in_filter': 0,
+ 'label': u'Source Warehouse',
+ 'no_copy': 0,
+ 'oldfieldname': u'from_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 0,
+ 'reqd': 0,
+ 'search_index': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 0,
+ 'colour': u'White:FFF',
+ 'description': u'<b>Notes:</b> Either Source or Target is Mandatory',
+ 'doctype': u'DocField',
+ 'fieldname': u'to_warehouse',
+ 'fieldtype': u'Link',
+ 'in_filter': 0,
+ 'label': u'Target Warehouse',
+ 'no_copy': 0,
+ 'oldfieldname': u'to_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 0,
+ 'reqd': 0,
+ 'search_index': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Transfer Date',
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Project',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 0,
+ 'default': u'Today',
+ 'doctype': u'DocField',
+ 'fieldname': u'transfer_date',
+ 'fieldtype': u'Date',
+ 'in_filter': 1,
+ 'label': u'Transfer Date',
'no_copy': 1,
- 'oldfieldname': 'transfer_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'transfer_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
@@ -567,15 +591,15 @@
# DocField
{
'allow_on_submit': 0,
- 'description': 'The date at which current entry will get or has actually executed.',
- 'doctype': 'DocField',
- 'fieldname': 'posting_date',
- 'fieldtype': 'Date',
+ 'description': u'The date at which current entry will get or has actually executed.',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Posting Date',
+ 'label': u'Posting Date',
'no_copy': 1,
- 'oldfieldname': 'posting_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'posting_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -586,14 +610,14 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'posting_time',
- 'fieldtype': 'Time',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_time',
+ 'fieldtype': u'Time',
'in_filter': 0,
- 'label': 'Posting Time',
+ 'label': u'Posting Time',
'no_copy': 1,
- 'oldfieldname': 'posting_time',
- 'oldfieldtype': 'Time',
+ 'oldfieldname': u'posting_time',
+ 'oldfieldtype': u'Time',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -604,15 +628,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Link',
'in_filter': 0,
- 'label': 'Amended From',
+ 'label': u'Amended From',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Link',
- 'options': 'Stock Entry',
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Link',
+ 'options': u'Stock Entry',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
@@ -622,14 +646,14 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'transporter',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'transporter',
+ 'fieldtype': u'Data',
'in_filter': 0,
- 'label': 'Transporter',
+ 'label': u'Transporter',
'no_copy': 0,
- 'oldfieldname': 'transporter',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'transporter',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -639,15 +663,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'is_excisable_goods',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'is_excisable_goods',
+ 'fieldtype': u'Select',
'in_filter': 0,
- 'label': 'Is Excisable Goods',
+ 'label': u'Is Excisable Goods',
'no_copy': 0,
- 'oldfieldname': 'is_excisable_goods',
- 'oldfieldtype': 'Select',
- 'options': '\nYes\nNo',
+ 'oldfieldname': u'is_excisable_goods',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nYes\nNo',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -657,15 +681,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'excisable_goods',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'excisable_goods',
+ 'fieldtype': u'Select',
'in_filter': 0,
- 'label': 'Excisable Goods',
+ 'label': u'Excisable Goods',
'no_copy': 0,
- 'oldfieldname': 'excisable_goods',
- 'oldfieldtype': 'Select',
- 'options': '\nReturnable\nNon-Returnable',
+ 'oldfieldname': u'excisable_goods',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nReturnable\nNon-Returnable',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -675,16 +699,16 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'under_rule',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'under_rule',
+ 'fieldtype': u'Select',
'hidden': 1,
'in_filter': 0,
- 'label': 'Under Rule',
+ 'label': u'Under Rule',
'no_copy': 0,
- 'oldfieldname': 'under_rule',
- 'oldfieldtype': 'Select',
- 'options': '\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.',
+ 'oldfieldname': u'under_rule',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nOrdinary\n57 AC (5) a\n57 F (2) Non-Exc.',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -694,14 +718,14 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'remarks',
- 'fieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'remarks',
+ 'fieldtype': u'Text',
'in_filter': 0,
- 'label': 'Remarks',
+ 'label': u'Remarks',
'no_copy': 1,
- 'oldfieldname': 'remarks',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'remarks',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -712,15 +736,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 0,
- 'label': 'Cancel Reason',
+ 'label': u'Cancel Reason',
'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
@@ -730,44 +754,44 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Stock and Rate',
- 'oldfieldtype': 'Button',
- 'options': 'get_stock_and_rate',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Stock and Rate',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_stock_and_rate',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
'hidden': 0,
'in_filter': 0,
- 'label': 'Get Items',
+ 'label': u'Get Items',
'no_copy': 0,
- 'oldfieldtype': 'Button',
- 'options': 'get_items',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_items',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -776,26 +800,26 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'oldfieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'oldfieldtype': u'Section Break',
+ 'options': u'Simple',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'mtn_details',
- 'fieldtype': 'Table',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'mtn_details',
+ 'fieldtype': u'Table',
'in_filter': 0,
- 'label': 'MTN Details',
+ 'label': u'MTN Details',
'no_copy': 0,
- 'oldfieldname': 'mtn_details',
- 'oldfieldtype': 'Table',
- 'options': 'Stock Entry Detail',
+ 'oldfieldname': u'mtn_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Stock Entry Detail',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
@@ -805,14 +829,14 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'total_amount',
- 'fieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_amount',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Total Amount',
+ 'label': u'Total Amount',
'no_copy': 0,
- 'oldfieldname': 'total_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0,
@@ -821,25 +845,25 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Other Details',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Other Details',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Company',
+ 'label': u'Company',
'no_copy': 0,
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -850,15 +874,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
'in_filter': 0,
- 'label': 'Fiscal Year',
+ 'label': u'Fiscal Year',
'no_copy': 0,
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -869,15 +893,15 @@
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
'in_filter': 0,
- 'label': 'Select Print Heading',
+ 'label': u'Select Print Heading',
'no_copy': 0,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'report_hide': 0,
'search_index': 0
diff --git a/erpnext/support/DocType Label/Ticket/Ticket.txt b/erpnext/support/DocType Label/Ticket/Ticket.txt
deleted file mode 100644
index 8707e8f..0000000
--- a/erpnext/support/DocType Label/Ticket/Ticket.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'modified_by': 'Administrator', 'name': 'Ticket', 'parent': None, 'dt_label': 'Task', 'creation': '2010-06-28 12:55:47', 'modified': '2010-06-28 12:55:47', 'module': 'Accounts', 'doctype': 'DocType Label', 'idx': None, 'parenttype': None, 'owner': 'Administrator', 'docstatus': 0, 'dt': 'Ticket', 'parentfield': None}]
\ No newline at end of file
diff --git a/erpnext/support/Module Def/Support/Support.txt b/erpnext/support/Module Def/Support/Support.txt
deleted file mode 100644
index 9c66c3d..0000000
--- a/erpnext/support/Module Def/Support/Support.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-# Module Def, Support
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:42:15',
- 'docstatus': 0,
- 'modified': '2011-10-10 16:59:49',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Support',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Support',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'doctype_list': 'DocType Label, Ticket',
- 'is_hidden': 'No',
- 'module_desc': 'Manage maintenance quotes, orders, schedule etc.',
- 'module_icon': 'Maintenance.gif',
- 'module_label': 'Support',
- 'module_name': 'Support',
- 'module_seq': 8,
- 'name': '__common__'
- },
-
- # Module Def, Support
- {
- 'doctype': u'Module Def',
- 'name': 'Support'
- },
-
- # Module Def Item
- {
- 'description': "Database of Support Ticket's raised by Customers",
- 'display_name': 'Support Ticket',
- 'doc_name': 'Support Ticket',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nopening_date\ncustomer\nallocated_to'
- },
-
- # Module Def Item
- {
- 'description': 'Create schedule based on maintenance order',
- 'display_name': 'Maintenance Schedule',
- 'doc_name': 'Maintenance Schedule',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ntransaction_date\ncustomer\nsales_order_no'
- },
-
- # Module Def Item
- {
- 'description': 'Database of issues raised your Customers',
- 'display_name': 'Customer Issue',
- 'doc_name': 'Customer Issue',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\ncomplaint_date\ncustomer\nallocated_to\nallocated_on'
- },
-
- # Module Def Item
- {
- 'display_name': 'Maintenance Visit',
- 'doc_name': 'Maintenance Visit',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item',
- 'fields': 'status\nmntc_date\ncustomer\nmaintenance_type\ncompletion_status'
- },
-
- # Module Def Item
- {
- 'description': 'List of all scheduled mainteance. You can filter by sales person, date, serial no etc. ',
- 'display_name': 'Maintenance Schedule Details',
- 'doc_name': 'Maintenance Schedule Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'description': 'List of all issues raised by customer',
- 'display_name': 'Customer Issues',
- 'doc_name': 'Customer Issue',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Warranty/AMC Expiry Details',
- 'doc_name': 'Serial No',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Warranty/AMC Summary',
- 'doc_name': 'Serial No',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Maintenance Orderwise Pending Amount To Bill',
- 'doc_name': 'Sales Order Detail',
- 'doc_type': 'Reports',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Administrator'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Maintenance User'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Maintenance Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/support/Role/Maintenance Manager/Maintenance Manager.txt b/erpnext/support/Role/Maintenance Manager/Maintenance Manager.txt
deleted file mode 100644
index 291a52c..0000000
--- a/erpnext/support/Role/Maintenance Manager/Maintenance Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Maintenance Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-07-22 15:19:33',
- 'modified_by': 'Administrator',
- 'owner': 'ashwini@webnotestech.com'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Support',
- 'name': '__common__',
- 'role_name': 'Maintenance Manager'
- },
-
- # Role, Maintenance Manager
- {
- 'doctype': 'Role',
- 'name': 'Maintenance Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/support/Role/Maintenance User/Maintenance User.txt b/erpnext/support/Role/Maintenance User/Maintenance User.txt
deleted file mode 100644
index c0a9e4e..0000000
--- a/erpnext/support/Role/Maintenance User/Maintenance User.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Maintenance User
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:51',
- 'docstatus': 0,
- 'modified': '2010-07-22 15:19:19',
- 'modified_by': 'Administrator',
- 'owner': 'ashwini@webnotestech.com'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Support',
- 'name': '__common__',
- 'role_name': 'Maintenance User'
- },
-
- # Role, Maintenance User
- {
- 'doctype': 'Role',
- 'name': 'Maintenance User'
- }
-]
\ No newline at end of file
diff --git a/erpnext/support/Role/Support Manager/Support Manager.txt b/erpnext/support/Role/Support Manager/Support Manager.txt
deleted file mode 100644
index 409280f..0000000
--- a/erpnext/support/Role/Support Manager/Support Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Support Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-12-28 17:02:39',
- 'docstatus': 0,
- 'modified': '2010-12-28 15:17:40',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Support',
- 'name': '__common__',
- 'role_name': 'Support Manager'
- },
-
- # Role, Support Manager
- {
- 'doctype': 'Role',
- 'name': 'Support Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/support/Role/Support Team/Support Team.txt b/erpnext/support/Role/Support Team/Support Team.txt
deleted file mode 100644
index f5bcca6..0000000
--- a/erpnext/support/Role/Support Team/Support Team.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Support Team
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-12-28 17:02:39',
- 'docstatus': 0,
- 'modified': '2010-12-28 15:19:11',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': 'Support',
- 'name': '__common__',
- 'role_name': 'Support Team'
- },
-
- # Role, Support Team
- {
- 'doctype': 'Role',
- 'name': 'Support Team'
- }
-]
\ No newline at end of file
diff --git a/erpnext/support/__init__.py b/erpnext/support/__init__.py
index e69de29..b94538b 100644
--- a/erpnext/support/__init__.py
+++ b/erpnext/support/__init__.py
@@ -0,0 +1,6 @@
+install_docs = [
+ {'doctype':'Role', 'name':'Support Team'},
+ {'doctype':'Role', 'name':'Support Manager'},
+ {'doctype':'Role', 'name':'Maintenance User'},
+ {'doctype':'Role', 'name':'Maintenance Manager'}
+]
\ No newline at end of file
diff --git a/erpnext/support/doctype/support_ticket/listview.js b/erpnext/support/doctype/support_ticket/listview.js
new file mode 100644
index 0000000..87c1224
--- /dev/null
+++ b/erpnext/support/doctype/support_ticket/listview.js
@@ -0,0 +1,45 @@
+// render
+wn.doclistviews['Support Ticket'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabSupport Ticket`.status",
+ "`tabSupport Ticket`.subject",
+ "`tabSupport Ticket`.description"
+ ]);
+ this.stats = this.stats.concat(['status']);
+ },
+
+ prepare_data: function(data) {
+ this._super(data);
+ if(data.status=='Open' || data.status=='To Reply') {
+ data.label_type = 'important'
+ }
+ else if(data.status=='Closed') {
+ data.label_type = 'success'
+ }
+ else if(data.status=='Hold') {
+ data.label_type = 'info'
+ }
+ else if(data.status=='Waiting for Customer') {
+ data.label_type = 'info'
+ data.status = 'Waiting'
+ }
+ data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
+
+ data.description = data.description + ' | ' + data.subject;
+
+ // description
+ if(data.description && data.description.length > 50) {
+ data.description = '<span title="'+data.description+'">' + data.description.substr(0,50) + '...</span>';
+ }
+ },
+
+ columns: [
+ {width: '20%', content:'name'},
+ {width: '10%', content:'status_html'},
+ {width: '56%', content:'tags+description', css: {color:'#aaa'}},
+ {width: '14%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+
+});
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 86264a6..a51b83a 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -73,7 +73,7 @@
cur_frm.fields_dict['Thread HTML'].wrapper.innerHTML = '';
// render first message
- new EmailMessage(cur_frm.fields_dict['Thread HTML'].wrapper, {
+ new EmailMessage($a(cur_frm.fields_dict['Thread HTML'].wrapper, 'div'), {
from_email: doc.raised_by,
creation: doc.creation,
mail: doc.description,
@@ -81,8 +81,8 @@
}, null, -1)
// render thread
- cs.thread_list = new wn.widgets.Listing({
- parent: cur_frm.fields_dict['Thread HTML'].wrapper,
+ cs.thread_list = new wn.ui.Listing({
+ parent: $a(cur_frm.fields_dict['Thread HTML'].wrapper, 'div'),
no_result_message: 'No responses yet',
get_query: function() {
return 'select mail, from_email, creation, content_type '+
@@ -188,7 +188,7 @@
);
// show only first and last message
- if(idx==-1 || list && list.values.length-1==idx) {
+ if(idx==-1 || list && list.data.length-1==idx) {
$ds(this.message)
}
diff --git a/erpnext/utilities/Module Def/Utilities/Utilities.txt b/erpnext/utilities/Module Def/Utilities/Utilities.txt
deleted file mode 100644
index 98b4d0f..0000000
--- a/erpnext/utilities/Module Def/Utilities/Utilities.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Module Def, Utilities
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2011-07-01 17:46:25',
- 'docstatus': 0,
- 'modified': '2011-07-01 17:47:34',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': 'Module Def',
- 'is_hidden': 'No',
- 'module_label': 'Utilities',
- 'module_name': 'Utilities',
- 'name': '__common__'
- },
-
- # Module Def, Utilities
- {
- 'doctype': 'Module Def',
- 'name': 'Utilities'
- }
-]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/address/address.js b/erpnext/utilities/doctype/address/address.js
index fc274ef..1c2bab7 100644
--- a/erpnext/utilities/doctype/address/address.js
+++ b/erpnext/utilities/doctype/address/address.js
@@ -17,5 +17,28 @@
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
if(doc.supplier) cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
+
+ var route = wn.get_route();
+ if(route[1]=='Supplier') {
+ var supplier = locals.Supplier[route[2]]
+ doc.supplier = supplier.name;
+ doc.supplier_name = supplier.supplier_name;
+ doc.address_type = 'Office';
+ } else if(route[1]=='Customer') {
+ var customer = locals.Customer[route[2]]
+ doc.supplier = customer.name;
+ doc.customer_name = customer.customer_name;
+ doc.address_type = 'Office';
+ } else if(route[1]=='Sales Partner') {
+ var sp = locals['Sales Partner'][route[2]];
+ doc.sales_partner = sp.name;
+ ndoc.address_type = 'Office';
+ }
}
+cur_frm.cscript.hide_dialog = function() {
+ if(cur_frm.address_list)
+ cur_frm.address_list.run();
+}
+
+
diff --git a/erpnext/utilities/doctype/contact/contact.js b/erpnext/utilities/doctype/contact/contact.js
index 2aa89c1..9244b79 100644
--- a/erpnext/utilities/doctype/contact/contact.js
+++ b/erpnext/utilities/doctype/contact/contact.js
@@ -18,54 +18,28 @@
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
if(doc.supplier) cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
-}
-/*
-//---------- on refresh ----------------------
-cur_frm.cscript.refresh = function(doc,cdt,cdn){
-
-}
-
-
-//------------- Trigger on customer ---------------------
-cur_frm.cscript.is_customer = function(doc,cdt,cdn){
- if(!doc.is_customer){
- doc.customer = doc.customer_name = doc.customer_address = doc.customer_group = '';
- refresh_many(['customer','customer_name','customer_address','customer_group']);
+ var route = wn.get_route();
+ if(route[1]=='Supplier') {
+ var supplier = locals.Supplier[route[2]]
+ doc.supplier = supplier.name;
+ doc.supplier_name = supplier.supplier_name;
+ } else if(route[1]=='Customer') {
+ var customer = locals.Customer[route[2]];
+ doc.customer = customer.name;
+ doc.customer_name = customer.customer_name;
+ if(customer.customer_type == 'Individual') {
+ doc.first_name = customer.customer_name;
+ }
+ } else if(route[1]=='Sales Partner') {
+ var sp = locals['Sales Partner'][route[2]];
+ doc.sales_partner = sp.name;
}
}
-//------------- Trigger on supplier -----------------------
-cur_frm.cscript.is_supplier = function(doc,cdt,cdn){
- if(!doc.is_supplier){
- doc.supplier = doc.supplier_name = doc.supplier_address = doc.supplier_type = '';
- refresh_many(['supplier','supplier_address','supplier_name','supplier_type']);
- }
-}
-
-//--------------- Trigger on sales partner ---------------------
-cur_frm.cscript.is_sales_partner = function(doc,cdt,cdn){
- if(!doc.is_sales_partner){
- doc.sales_partner = doc.sales_partner_address = doc.partner_type = '';
- refresh_many(['sales_partner','sales_partner_address','partner_type']);
- }
+cur_frm.cscript.hide_dialog = function() {
+ if(cur_frm.contact_list)
+ cur_frm.contact_list.run();
}
-//----------- Trigger on supplier name ------------------------
-cur_frm.cscript.supplier = function(doc,cdt,cdn){
- arg = {'dt':'Supplier','dn':doc.supplier,'nm':'supplier_name','fld':'supplier_address','type':'supplier_type'};
- get_server_fields('get_address',docstring(arg),'',doc,cdt,cdn,1);
-}
-//------------ Trigger on customer name ------------------------
-cur_frm.cscript.customer = function(doc,cdt,cdn){
- arg = {'dt':'Customer','dn':doc.customer,'nm':'customer_name','fld':'customer_address','type':'customer_group'};
- get_server_fields('get_address',docstring(arg),'',doc,cdt,cdn,1);
-}
-
-//------------ Trigger on sales partner ------------------------
-cur_frm.cscript.sales_partner = function(doc,cdt,cdn){
- arg = {'dt':'Sales Partner','dn':doc.sales_partner,'nm':'partner_name','fld':'sales_partner_address','type':'partner_type'};
- get_server_fields('get_address',docstring(arg),'',doc,cdt,cdn,1);
-}
-*/
diff --git a/erpnext/utilities/page/calendar/calendar.js b/erpnext/utilities/page/calendar/calendar.js
index ac1ac88..9aa5df8 100644
--- a/erpnext/utilities/page/calendar/calendar.js
+++ b/erpnext/utilities/page/calendar/calendar.js
@@ -24,7 +24,11 @@
if(!erpnext.calendar) {
erpnext.calendar = new Calendar();
erpnext.calendar.init(wrapper);
- rename_observers.push(erpnext.calendar);
+
+ var me = this;
+ $(document).bind('rename', function(event, dt, old_name, new_name) {
+ erpnext.calendar.rename_notify(dt, old_name, new_name)
+ });
}
}
@@ -63,7 +67,7 @@
Calendar.prototype.rename_notify = function(dt, old_name, new_name) {
// calendar
- if(dt = 'Event'){
+ if(dt = 'Event'){
if(this.events_by_name[old_name]) {
delete this.events_by_name[old_name];
}
diff --git a/erpnext/utilities/page/messages/messages.css b/erpnext/utilities/page/messages/messages.css
index 81260ab..49b3771 100644
--- a/erpnext/utilities/page/messages/messages.css
+++ b/erpnext/utilities/page/messages/messages.css
@@ -1,9 +1,9 @@
#message-post-text {
- height: 3em;
+ width: 50%;
}
#message-list {
- margin: 0px 40px;
+
}
.message {
diff --git a/erpnext/utilities/page/messages/messages.html b/erpnext/utilities/page/messages/messages.html
index b645d3f..7538785 100644
--- a/erpnext/utilities/page/messages/messages.html
+++ b/erpnext/utilities/page/messages/messages.html
@@ -3,7 +3,7 @@
<a class="close" onclick="window.history.back();">×</a>
<h1>Messages</h1>
<div class="well">
- <textarea id="message-post-text"></textarea>
+ <input id="message-post-text"></input>
<button disabled="disabled" id="message-post" class="btn btn-small"><i class="icon-play"></i> Post</button>
</div>
<div id="message-list">
diff --git a/erpnext/utilities/page/messages/messages.js b/erpnext/utilities/page/messages/messages.js
index 6937796..ef56020 100644
--- a/erpnext/utilities/page/messages/messages.js
+++ b/erpnext/utilities/page/messages/messages.js
@@ -43,20 +43,24 @@
});
// enable, disable button
- $('#message-post-text').keyup(function() {
+ $('#message-post-text').keyup(function(e) {
if($(this).val()) {
$('#message-post').attr('disabled', false);
} else {
$('#message-post').attr('disabled', true);
}
+
+ if(e.which==13) {
+ $('#message-post').click();
+ }
})
}
-wn.pages.messages.onshow = function(wrapper) {
+$(wn.pages.messages).bind('show', function() {
erpnext.messages.show();
- setTimeout(erpnext.messages.refresh, 5000);
+ setTimeout(erpnext.messages.refresh, 7000);
$('#message-post-text').focus();
-}
+})
erpnext.messages = {
show: function() {
@@ -75,8 +79,8 @@
},
// check for updates every 5 seconds if page is active
refresh: function() {
- setTimeout(erpnext.messages.refresh, 10000);
- if(page_body.cur_page_label != 'messages') return;
+ setTimeout(erpnext.messages.refresh, 7000);
+ if(wn.container.page.label != 'Messages') return;
erpnext.messages.show();
},
get_contact: function() {
@@ -91,13 +95,15 @@
return user;
},
make_list: function() {
- erpnext.messages.list = new wn.widgets.Listing({
+ erpnext.messages.list = new wn.ui.Listing({
parent: $('#message-list').get(0),
method: 'utilities.page.messages.messages.get_list',
args: {
contact: null
},
render_row: function(wrapper, data) {
+ $(wrapper).removeClass('list-row');
+
data.creation = dateutil.comment_when(data.creation);
data.comment_by_fullname = wn.user_info(data.owner).fullname;
diff --git a/erpnext/utilities/page/messages/messages.py b/erpnext/utilities/page/messages/messages.py
index b282991..3a407dd 100644
--- a/erpnext/utilities/page/messages/messages.py
+++ b/erpnext/utilities/page/messages/messages.py
@@ -56,8 +56,12 @@
@webnotes.whitelist()
def post(arg=None):
"""post message"""
- import json
- arg = json.loads(arg)
+ if arg:
+ import json
+ arg = json.loads(arg)
+ else:
+ arg = {}
+ arg.update(webnotes.form_dict)
from webnotes.model.doc import Document
d = Document('Comment Widget Record')
d.comment = arg['txt']
@@ -69,4 +73,4 @@
def delete(arg=None):
webnotes.conn.sql("""delete from `tabComment Widget Record` where name=%s""",
webnotes.form_dict['name']);
-
\ No newline at end of file
+
diff --git a/erpnext/utilities/page/todo/todo.css b/erpnext/utilities/page/todo/todo.css
index 4ac49d6..704e600 100644
--- a/erpnext/utilities/page/todo/todo.css
+++ b/erpnext/utilities/page/todo/todo.css
@@ -3,6 +3,7 @@
border-bottom: 1px solid #DEB85F;
margin-bottom: 5px;
height: 14px;
+ clear: both;
}
.todoitem .label {
@@ -20,7 +21,7 @@
.todoitem .ref_link {
float: left;
- margin-left: 14px;
+ margin-left: 10px;
display: inline-block;
line-height: 18px;
}
@@ -28,4 +29,4 @@
.todoitem .description {
cursor: pointer;
float: left;
-}
\ No newline at end of file
+}
diff --git a/erpnext/utilities/page/todo/todo.html b/erpnext/utilities/page/todo/todo.html
index 3400455..32a0a78 100644
--- a/erpnext/utilities/page/todo/todo.html
+++ b/erpnext/utilities/page/todo/todo.html
@@ -4,7 +4,7 @@
<br>
<div id="todo-list">
</div>
- <div style="margin-top: 21px">
+ <div style="margin-top: 21px; clear: both">
<button id="add-todo" class="btn btn-small"><i class="icon-plus"></i> Add</button>
</div>
</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
index dfaa7cd..dcdf50a 100644
--- a/erpnext/utilities/page/todo/todo.js
+++ b/erpnext/utilities/page/todo/todo.js
@@ -45,10 +45,15 @@
'Low':''
}
todo.labelclass = label_map[todo.priority];
- todo.userdate = dateutil.str_to_user(todo.date);
+ todo.userdate = dateutil.str_to_user(todo.date) || '';
+ if(todo.assigned_by) {
+ todo.fullname = repl("[By %(fullname)s] ", {
+ fullname: wn.boot.user_info[todo.assigned_by].fullname
+ })
+ } else { todo.fullname = ''; }
if(todo.reference_name && todo.reference_type) {
todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
- %(reference_name)s</a>', todo);
+ %(reference_type)s: %(reference_name)s</a>', todo);
} else if(todo.reference_type) {
todo.link = repl('<a href="#!List/%(reference_type)s">\
%(reference_type)s</a>', todo);
@@ -59,8 +64,8 @@
<span class="description">\
<span class="label %(labelclass)s">%(priority)s</span>\
<span class="help" style="margin-right: 7px">%(userdate)s</span>\
- %(description)s</span>\
- <span class="ref_link">→\
+ %(fullname)s%(description)s</span>\
+ <span class="ref_link">→ \
%(link)s</span>\
<a href="#" class="close">×</a>\
</div>', todo));
diff --git a/erpnext/utilities/page/users/users.js b/erpnext/utilities/page/users/users.js
index f87dbe1..ad238ae 100644
--- a/erpnext/utilities/page/users/users.js
+++ b/erpnext/utilities/page/users/users.js
@@ -269,8 +269,8 @@
</div>', {role: this.roles[i]}));
}
$(this.dialog.body).append('<div style="clear: both">\
- <button class="btn btn-small btn-primary">Save</button></div>');
- $(this.dialog.body).find('button.btn-primary').click(function() {
+ <button class="btn btn-small btn-info">Save</button></div>');
+ $(this.dialog.body).find('button.btn-info').click(function() {
me.save();
});
$(this.dialog.body).find('.user-role a').click(function() {
@@ -314,7 +314,7 @@
unset_roles: JSON.stringify(unset_roles),
uid: this.uid
},
- btn: $(this.dialog.body).find('.btn-primary').get(0),
+ btn: $(this.dialog.body).find('.btn-info').get(0),
callback: function() {
}
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index b78bed1..032b52f 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -81,12 +81,12 @@
cond = 'name="%s"' % address_name
if is_shipping_address:
- details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc limit 1" % cond, as_dict = 1)
+ details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_shipping_address desc limit 1" % cond, as_dict = 1)
else:
- details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1)
+ details = webnotes.conn.sql("select name, address_line1, address_line2, city, country, pincode, state, phone, fax from `tabAddress` where %s and docstatus != 2 order by is_primary_address desc limit 1" % cond, as_dict = 1)
extract = lambda x: details and details[0] and details[0].get(x,'') or ''
- address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone')]
+ address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','phone'),('\nFax: ', 'fax')]
address_display = ''.join([a[0]+extract(a[1]) for a in address_fields if extract(a[1])])
if address_display.startswith('\n'): address_display = address_display[1:]
@@ -145,7 +145,7 @@
# Get Lead Details
# -----------------------
def get_lead_details(self, name):
- details = webnotes.conn.sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id from `tabLead` where name = '%s'" %(name), as_dict = 1)
+ details = webnotes.conn.sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, territory, contact_no, mobile_no, email_id, company_name from `tabLead` where name = '%s'" %(name), as_dict = 1)
extract = lambda x: details and details[0] and details[0].get(x,'') or ''
address_fields = [('','address_line1'),('\n','address_line2'),('\n','city'),(' ','pincode'),('\n','state'),('\n','country'),('\nPhone: ','contact_no')]
@@ -157,7 +157,8 @@
'address_display' : address_display,
'territory' : extract('territory'),
'contact_mobile' : extract('mobile_no'),
- 'contact_email' : extract('email_id')
+ 'contact_email' : extract('email_id'),
+ 'organization' : extract('company_name')
}
return ret
diff --git a/erpnext/website/Module Def/Website/Website.txt b/erpnext/website/Module Def/Website/Website.txt
deleted file mode 100644
index e423869..0000000
--- a/erpnext/website/Module Def/Website/Website.txt
+++ /dev/null
@@ -1,142 +0,0 @@
-# Module Def, Website
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-23 17:05:32',
- 'docstatus': 0,
- 'modified': '2012-02-02 13:23:41',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'name': '__common__',
- 'parent': 'Website',
- 'parentfield': 'roles',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def Item
- {
- 'doctype': 'Module Def Item',
- 'name': '__common__',
- 'parent': 'Website',
- 'parentfield': 'items',
- 'parenttype': 'Module Def'
- },
-
- # These values are common for all Module Def
- {
- 'disabled': 'No',
- 'doctype': u'Module Def',
- 'is_hidden': 'No',
- 'module_label': 'Website',
- 'module_name': 'Website',
- 'name': '__common__'
- },
-
- # Module Def, Website
- {
- 'doctype': u'Module Def',
- 'name': 'Website'
- },
-
- # Module Def Item
- {
- 'display_name': 'Web Page',
- 'doc_name': 'Web Page',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Product',
- 'doc_name': 'Product',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Blog',
- 'doc_name': 'Blog',
- 'doc_type': 'Forms',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Style Settings',
- 'doc_name': 'Style Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Website Settings',
- 'doc_name': 'Website Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Home Settings',
- 'doc_name': 'Home Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'About Us Settings',
- 'doc_name': 'About Us Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Contact Us Settings',
- 'doc_name': 'Contact Us Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Item
- {
- 'display_name': 'Products Settings',
- 'doc_name': 'Products Settings',
- 'doc_type': 'Single DocType',
- 'doctype': 'Module Def Item'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'System Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'System Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Website Manager'
- },
-
- # Module Def Role
- {
- 'doctype': 'Module Def Role',
- 'role': 'Website Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/Role/Blogger/Blogger.txt b/erpnext/website/Role/Blogger/Blogger.txt
deleted file mode 100644
index a380d4c..0000000
--- a/erpnext/website/Role/Blogger/Blogger.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Blogger
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-27 12:22:24',
- 'docstatus': 0,
- 'modified': '2012-01-27 12:22:24',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': u'Website',
- 'name': '__common__',
- 'role_name': u'Blogger'
- },
-
- # Role, Blogger
- {
- 'doctype': 'Role',
- 'name': u'Blogger'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/Role/Website Manager/Website Manager.txt b/erpnext/website/Role/Website Manager/Website Manager.txt
deleted file mode 100644
index ad1ad9a..0000000
--- a/erpnext/website/Role/Website Manager/Website Manager.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Role, Website Manager
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-24 10:18:47',
- 'docstatus': 0,
- 'modified': '2012-02-06 15:22:27',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all Role
- {
- 'doctype': 'Role',
- 'module': u'Website',
- 'name': '__common__',
- 'role_name': u'Website Manager'
- },
-
- # Role, Website Manager
- {
- 'doctype': 'Role',
- 'name': u'Website Manager'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/__init__.py b/erpnext/website/__init__.py
index e69de29..1ed1cf1 100644
--- a/erpnext/website/__init__.py
+++ b/erpnext/website/__init__.py
@@ -0,0 +1,4 @@
+install_docs = [
+ {"doctype":"Role", "name":"Blogger"},
+ {"doctype":"Role", "name":"Website Manager"},
+]
\ No newline at end of file
diff --git a/erpnext/website/doctype/blog/blog_page.js b/erpnext/website/doctype/blog/blog_page.js
index 76cbf81..d419a0b 100644
--- a/erpnext/website/doctype/blog/blog_page.js
+++ b/erpnext/website/doctype/blog/blog_page.js
@@ -21,7 +21,7 @@
var side = $(wrapper).find('.web-side-section')
.append('<h4>Recent Posts</h4>').get(0);
- wrapper.recent_list = new wn.widgets.Listing({
+ wrapper.recent_list = new wn.ui.Listing({
parent: side,
query: 'select name, title, left(content, 100) as content from tabBlog\
where ifnull(published,1)=1',
@@ -39,7 +39,7 @@
// comments
$(wrapper).find('.web-main-section').append('<hr><h3>Comments</h3>');
- wrapper.comment_list = new wn.widgets.Listing({
+ wrapper.comment_list = new wn.ui.Listing({
parent: $(wrapper).find('.web-main-section').get(0),
query: 'select comment, comment_by_fullname, modified\
from `tabComment Widget Record` where comment_doctype="Page"\
diff --git a/erpnext/website/doctype/product/product_page.js b/erpnext/website/doctype/product/product_page.js
index 0f0c56b..926ef69 100644
--- a/erpnext/website/doctype/product/product_page.js
+++ b/erpnext/website/doctype/product/product_page.js
@@ -30,7 +30,7 @@
});
// similar products
- wrapper.similar = new wn.widgets.Listing({
+ wrapper.similar = new wn.ui.Listing({
parent: $(wrapper).find('.similar-products').get(0),
hide_refresh: true,
page_length: 5,
diff --git a/erpnext/website/doctype/style_settings/custom_template.css b/erpnext/website/doctype/style_settings/custom_template.css
index 8eb3d63..72c15a1 100644
--- a/erpnext/website/doctype/style_settings/custom_template.css
+++ b/erpnext/website/doctype/style_settings/custom_template.css
@@ -5,13 +5,19 @@
background-color: #{{ doc.background_color }};
{% endif %}
{% if doc.font %}
- font-family: {{ doc.font }} !important;
+ font-family: '{{ doc.font }}', Verdana, Sans !important;
{% endif %}
{% if doc.font_size %}
font-size: {{ doc.font_size }} !important;
{% endif %}
}
+{% if doc.font_size %}
+.small {
+ font-size: {{ doc.small_font_size }} !important;
+}
+{% endif %}
+
{% if doc.footer_font_color %}
footer {
color: {{ doc.footer_font_color }};
@@ -26,6 +32,6 @@
{% if doc.heading_font %}
h1, h2, h3, h4, h5 {
- font-family: {{ doc.heading_font}} !important;
+ font-family: '{{ doc.heading_font}}', Arial, 'Helvetica Neue' !important;
}
{% endif %}
diff --git a/erpnext/website/doctype/style_settings/style_settings.py b/erpnext/website/doctype/style_settings/style_settings.py
index 83961e0..282cd93 100644
--- a/erpnext/website/doctype/style_settings/style_settings.py
+++ b/erpnext/website/doctype/style_settings/style_settings.py
@@ -25,9 +25,13 @@
with open('erpnext/website/doctype/style_settings/custom_template.css', 'r') as f:
temp = Template(f.read())
+ self.doc.small_font_size = str(int(self.doc.font_size[:-2])-2) + 'px'
+
self.doc.custom_css = temp.render(doc = self.doc)
from webnotes.session_cache import clear_cache
clear_cache('Guest')
+ del self.doc.fields['small_font_size']
+
\ No newline at end of file
diff --git a/erpnext/website/doctype/style_settings/style_settings.txt b/erpnext/website/doctype/style_settings/style_settings.txt
index f07a947..18bd24c 100644
--- a/erpnext/website/doctype/style_settings/style_settings.txt
+++ b/erpnext/website/doctype/style_settings/style_settings.txt
@@ -5,150 +5,150 @@
{
'creation': '2012-02-02 09:57:25',
'docstatus': 0,
- 'modified': '2012-02-02 10:47:38',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-21 10:53:38',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1328159294',
+ '_last_update': u'1330594969',
'allow_attach': 1,
- 'colour': 'White:FFF',
- 'description': 'Set your background color, font and image (tiled)',
+ 'colour': u'White:FFF',
+ 'description': u'Set your background color, font and image (tiled)',
'doctype': 'DocType',
'issingle': 1,
'max_attachments': 1,
- 'module': 'Website',
+ 'module': u'Website',
'name': '__common__',
- 'section_style': 'Simple',
+ 'section_style': u'Simple',
'show_in_menu': 0,
- 'version': 9
+ 'version': 15
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Style Settings',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Style Settings',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Style Settings',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Style Settings',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1,
- 'role': 'Website Manager'
+ 'role': u'Website Manager'
},
# DocType, Style Settings
{
'doctype': 'DocType',
- 'name': 'Style Settings'
+ 'name': u'Style Settings'
},
# DocPerm
{
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Solid background color (default light gray)',
- 'doctype': 'DocField',
- 'fieldname': 'background_color',
- 'fieldtype': 'Data',
- 'label': 'Background Color',
+ 'colour': u'White:FFF',
+ 'description': u'Solid background color (default light gray)',
+ 'doctype': u'DocField',
+ 'fieldname': u'background_color',
+ 'fieldtype': u'Data',
+ 'label': u'Background Color',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'If image is selected, color will be ignored (attach first)',
- 'doctype': 'DocField',
- 'fieldname': 'background_image',
- 'fieldtype': 'Select',
- 'label': 'Background Image',
- 'options': 'attach_files:',
+ 'colour': u'White:FFF',
+ 'description': u'If image is selected, color will be ignored (attach first)',
+ 'doctype': u'DocField',
+ 'fieldname': u'background_image',
+ 'fieldtype': u'Select',
+ 'label': u'Background Image',
+ 'options': u'attach_files:',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'font',
- 'fieldtype': 'Select',
- 'label': 'Font',
- 'options': '\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma',
+ 'doctype': u'DocField',
+ 'fieldname': u'font',
+ 'fieldtype': u'Select',
+ 'label': u'Font',
+ 'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nPontano Sans\nDroid Sans\nGill Sans',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'font_size',
- 'fieldtype': 'Select',
- 'label': 'Font Size',
- 'options': '\n12px\n13px\n14px',
+ 'doctype': u'DocField',
+ 'fieldname': u'font_size',
+ 'fieldtype': u'Select',
+ 'label': u'Font Size',
+ 'options': u'\n12px\n13px\n14px\n15px\n16px',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'heading_font',
- 'fieldtype': 'Select',
- 'label': 'Heaing Font',
- 'options': '\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma',
+ 'doctype': u'DocField',
+ 'fieldname': u'heading_font',
+ 'fieldtype': u'Select',
+ 'label': u'Heading Font',
+ 'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nPontano Sans\nDroid Sans\nGill Sans',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select a white footer foreground color if you have a dark background',
- 'doctype': 'DocField',
- 'fieldname': 'footer_font_color',
- 'fieldtype': 'Select',
- 'label': 'Footer Font Color',
- 'options': '\nwhite',
+ 'colour': u'White:FFF',
+ 'description': u'Select a white footer foreground color if you have a dark background',
+ 'doctype': u'DocField',
+ 'fieldname': u'footer_font_color',
+ 'fieldtype': u'Select',
+ 'label': u'Footer Font Color',
+ 'options': u'\nwhite',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Auto generated',
- 'doctype': 'DocField',
- 'fieldname': 'custom_css',
- 'fieldtype': 'Code',
- 'label': 'Custom CSS',
+ 'colour': u'White:FFF',
+ 'description': u'Auto generated',
+ 'doctype': u'DocField',
+ 'fieldname': u'custom_css',
+ 'fieldtype': u'Code',
+ 'label': u'Custom CSS',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'file_list',
- 'fieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'file_list',
+ 'fieldtype': u'Text',
'hidden': 1,
- 'label': 'File List',
+ 'label': u'File List',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
diff --git a/erpnext/website/js/product_category.js b/erpnext/website/js/product_category.js
index 9e0c7f0..956d7a6 100644
--- a/erpnext/website/js/product_category.js
+++ b/erpnext/website/js/product_category.js
@@ -18,7 +18,7 @@
erpnext.product_item_group = {}
erpnext.make_product_categories = function(wrapper) {
- wrapper.category_list = new wn.widgets.Listing({
+ wrapper.category_list = new wn.ui.Listing({
parent: $(wrapper).find('.more-categories').get(0),
query: 'select label, count(t2.name) as items, t1.item_group \
from `tabProduct Group` t1, `tabProduct` t2, tabItem t3\
diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js
index 90ad3e8..4f9ed7f 100644
--- a/erpnext/website/js/topbar.js
+++ b/erpnext/website/js/topbar.js
@@ -24,7 +24,7 @@
</li>\
*/
-erpnext.navbar.navbar = Class.extend({
+erpnext.navbar.Navbar = Class.extend({
init: function() {
this.make();
$('.brand').html(wn.boot.website_settings.brand_html);
@@ -112,6 +112,6 @@
});
$(document).bind('startup', function() {
- erpnext.footer = new erpnext.Footer();
- erpnext.navbar.navbar = new erpnext.navbar.navbar();
+// erpnext.footer = new erpnext.Footer();
+ erpnext.navbar.navbar = new erpnext.navbar.Navbar();
})
diff --git a/erpnext/website/page/blog/blog.js b/erpnext/website/page/blog/blog.js
index 9ca7392..bc7aec4 100644
--- a/erpnext/website/page/blog/blog.js
+++ b/erpnext/website/page/blog/blog.js
@@ -16,7 +16,7 @@
pscript.onload_blog = function(wrapper) {
- wrapper.blog_list = new wn.widgets.Listing({
+ wrapper.blog_list = new wn.ui.Listing({
parent: $(wrapper).find('.web-main-section').get(0),
query: 'select tabBlog.name, title, left(content, 300) as content, tabBlog.modified, \
ifnull(first_name, "") as first_name, ifnull(last_name, "") as last_name \
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index 7af551e..09ccba0 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -57,7 +57,7 @@
}
erpnext.products.make_product_list = function(wrapper) {
- wrapper.mainlist = new wn.widgets.Listing({
+ wrapper.mainlist = new wn.ui.Listing({
parent: $(wrapper).find('.web-main-section').get(0),
run_btn: $(wrapper).find('.products-search .btn').get(0),
hide_refresh: true,
diff --git a/images/redbeech.jpg b/images/redbeech.jpg
new file mode 100644
index 0000000..2480dc9
--- /dev/null
+++ b/images/redbeech.jpg
Binary files differ
diff --git a/js/all-app.js b/js/all-app.js
index 0dc4b58..925611a 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index 11e7313..778b45f 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -1,7 +1,8 @@
/*
* lib/js/lib/history/history.min.js
- *//*
+ */
+/*
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
@@ -11,26 +12,13 @@
*/
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
-// manage history
-// load pages via ajax
-// setup the history adapter
-// if settings no_history is set, no history will be bound
-// this can be used to make it work with legacy
-$(document).bind('ready', function() {
- // standard page openener
- $(window).bind('hashchange', function() {
- if(wn.settings.no_history)
- return;
-
- // load the state on the browser
- wn.page.set(location.hash);
- });
-})
/*
* lib/js/lib/bootstrap.min.js
- */!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
+ */
+!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
+
/*
* lib/js/lib/sprintf.js
*/
@@ -61,6 +49,7 @@
/*
* lib/js/core.min.js
*/
+
/*
* lib/js/wn/class.js
*/;(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
@@ -75,13 +64,6 @@
parent=parent[n];}}
wn.provide('wn.settings');wn.provide('wn.ui');
/*
- * lib/js/wn/xmlhttp.js
- */
-wn.xmlhttp={request:function(){if(window.XMLHttpRequest)
-return new XMLHttpRequest();else if(window.ActiveXObject)
-return new ActiveXObject("MsXml2.XmlHttp");},complete:function(req,callback,url){if(req.status==200||req.status==304){callback(req.responseText);}else{alert(url+' request error: '+req.statusText+' ('+req.status+')');}},get:function(url,callback,args,async){if(async===null)async=true;var req=wn.xmlhttp.request();req.onreadystatechange=function(){if(req.readyState==4){wn.xmlhttp.complete(req,callback,url)}}
-var sep=((args&&args.indexOf('?'))==-1)?'?':'&';var u=args?(url+sep+args):url;req.open('GET',u,async);req.send(null);if(!async){wn.xmlhttp.complete(req,callback,url)}}}
-/*
* lib/js/wn/versions.js
*/
wn.versions={check:function(){if(window.localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
@@ -92,9 +74,8 @@
*/
wn.assets={executed_:{},exists:function(src){if('localStorage'in window&&localStorage.getItem(src))
return true},add:function(src,txt){if('localStorage'in window){localStorage.setItem(src,txt);}},get:function(src){return localStorage.getItem(src);},extn:function(src){if(src.indexOf('?')!=-1){src=src.split('?').slice(-1)[0];}
-return src.split('.').slice(-1)[0];},load:function(src){var t=src;wn.xmlhttp.get(t,function(txt){wn.assets.add(src,txt);},'q='+Math.floor(Math.random()*1000),false)},execute:function(src){if(!wn.assets.exists(src)){wn.assets.load(src);}
-var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type](wn.assets.get(src),src);wn.assets.executed_[src]=1;}},handler:{js:function(txt,src){wn.dom.eval(txt);},css:function(txt,src){var se=document.createElement('style');se.type="text/css";if(se.styleSheet){se.styleSheet.cssText=txt;}else{se.appendChild(document.createTextNode(txt));}
-document.getElementsByTagName('head')[0].appendChild(se);},cgi:function(txt,src){wn.dom.eval(txt)}}}
+return src.split('.').slice(-1)[0];},load:function(src){var t=src;$.ajax({url:t,data:{q:Math.floor(Math.random()*1000)},dataType:'text',success:function(txt){wn.assets.add(src,txt);},async:false})},execute:function(src){if(!wn.assets.exists(src)){wn.assets.load(src);}
+var type=wn.assets.extn(src);if(wn.assets.handler[type]){wn.assets.handler[type](wn.assets.get(src),src);wn.assets.executed_[src]=1;}},handler:{js:function(txt,src){wn.dom.eval(txt);},css:function(txt,src){wn.dom.set_style(txt);},cgi:function(txt,src){wn.dom.eval(txt)}}}
/*
* lib/js/wn/require.js
*/
@@ -104,7 +85,9 @@
* lib/js/wn/dom.js
*/
wn.provide('wn.dom');wn.dom.by_id=function(id){return document.getElementById(id);}
-wn.dom.eval=function(txt){var el=document.createElement('script');el.appendChild(document.createTextNode(txt));document.getElementsByTagName('head')[0].appendChild(el);}
+wn.dom.eval=function(txt){if(!txt)return;var el=document.createElement('script');el.appendChild(document.createTextNode(txt));document.getElementsByTagName('head')[0].appendChild(el);}
+wn.dom.set_style=function(txt){if(!txt)return;var se=document.createElement('style');se.type="text/css";if(se.styleSheet){se.styleSheet.cssText=txt;}else{se.appendChild(document.createTextNode(txt));}
+document.getElementsByTagName('head')[0].appendChild(se);}
wn.dom.add=function(parent,newtag,className,cs,innerHTML,onclick){if(parent&&parent.substr)parent=wn.dom.by_id(parent);var c=document.createElement(newtag);if(parent)
parent.appendChild(c);if(className){if(newtag.toLowerCase()=='img')
c.src=className
@@ -112,15 +95,19 @@
c.className=className;}
if(cs)wn.dom.css(c,cs);if(innerHTML)c.innerHTML=innerHTML;if(onclick)c.onclick=onclick;return c;}
wn.dom.css=function(ele,s){if(ele&&s){for(var i in s)ele.style[i]=s[i];};return ele;}
-wn.dom.hide=function(ele){ele.style.display='none';}
-wn.dom.show=function(ele,value){if(!value)value='block';ele.style.display=value;}
+wn.get_cookie=function(c){var t=""+document.cookie;var ind=t.indexOf(c);if(ind==-1||c=="")return"";var ind1=t.indexOf(';',ind);if(ind1==-1)ind1=t.length;return unescape(t.substring(ind+c.length+1,ind1));}
+wn.dom.set_box_shadow=function(ele,spread){$(ele).css('-moz-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-webkit-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')
+$(ele).css('-box-shadow','0px 0px '+spread+'px rgba(0,0,0,0.3);')}
/*
- * lib/js/wn/page.js
+ * lib/js/wn/model.js
*/
-wn.page={set:function(src){var new_selection=$('.inner div.content[_src="'+src+'"]');if(!new_selection.length){wn.assets.execute(src);new_selection=$('.inner div.content[_src="'+src+'"]');}
-$('.inner .current_page').removeClass('current_page');new_selection.addClass('current_page');var title=$('nav ul li a[href*="'+src+'"]').attr('title')||'No Title'
-state=window.location.hash;if(state!=src){window.location.hash=state;}
-else{document.title=title;}}}
+wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{if(name&&name.indexOf('New '+doctype)!=-1){name=LocalDB.create(doctype);callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
+/*
+ * lib/js/wn/misc/tools.js
+ */
+wn.markdown=function(txt){if(!wn.md2html){wn.require('lib/js/lib/showdown.js');wn.md2html=new Showdown.converter();}
+return wn.md2html.makeHtml(txt);}
/*
* lib/js/wn/misc/user.js
*/
@@ -130,6 +117,8 @@
if(!wn.boot.user_info[uid].fullname)
wn.boot.user_info[uid].fullname=uid;if(!wn.boot.user_info[uid].image)
wn.boot.user_info[uid].image=def.image;return wn.boot.user_info[uid];}
+wn.session_alive=true;$(document).bind('mousemove',function(){wn.session_alive=true;if(wn.session_alive_timeout)
+clearTimeout(wn.session_alive_timeout);wn.session_alive_timeout=setTimeout('wn.session_alive=false;',30000);})
/*
* lib/js/lib/json2.js
*/
@@ -159,19 +148,240 @@
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());
/*
+ * lib/js/wn/router.js
+ */
+wn.route=function(){wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
+wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
+wn.get_route=function(route){if(!route)
+route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
+wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;}
+wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
+return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
+/*
+ * lib/js/wn/ui/listing.js
+ */
+wn.provide('wn.ui');wn.ui.Listing=Class.extend({init:function(opts){this.opts=opts||{};this.page_length=20;this.start=0;this.data=[];if(opts){this.make();}},prepare_opts:function(){if(this.opts.new_doctype){if(wn.boot.profile.can_read.indexOf(this.opts.new_doctype)==-1){this.opts.new_doctype=null;}else{this.opts.new_doctype=get_doctype_label(this.opts.new_doctype);}}
+if(!this.opts.no_result_message){this.opts.no_result_message='Nothing to show'}},make:function(opts){if(opts){this.opts=opts;}
+this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
+ <div class="wnlist">\
+ <h3 class="title hide">%(title)s</h3>\
+ \
+ <div class="list-filters hide">\
+ <div class="show_filters well">\
+ <div>\
+ <button class="btn btn-small add-filter-btn">\
+ <i class="icon-plus"></i> Add Filter</button>\
+ </div>\
+ <div class="filter_area"></div>\
+ </div>\
+ </div>\
+ \
+ <div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
+ <div class="list-toolbar btn-group" style="display:inline-block; margin-right: 10px;">\
+ <a class="btn btn-small btn-refresh btn-info">\
+ <i class="icon-refresh icon-white"></i> Refresh</a>\
+ <a class="btn btn-small btn-new">\
+ <i class="icon-plus"></i> New</a>\
+ <a class="btn btn-small btn-filter">\
+ <i class="icon-search"></i> Filter</a>\
+ </div>\
+ <div style="display:inline-block; width: 24px; margin-left: 4px">\
+ <img src="lib/images/ui/button-load.gif" \
+ class="img-load"/></div>\
+ </div><div style="clear:both"></div>\
+ \
+ <div class="no-result help hide">\
+ %(no_result_message)s\
+ </div>\
+ \
+ <div class="result">\
+ <div class="result-list"></div>\
+ <div class="result-grid hide"></div>\
+ </div>\
+ \
+ <div class="paging-button">\
+ <button class="btn btn-small btn-more hide">More...</div>\
+ </div>\
+ </div>\
+ ',this.opts));this.$w=$(this.parent).find('.wnlist');this.set_events();if(this.show_filters){this.make_filters();}},add_button:function(html,onclick,before){$(html).click(onclick).insertBefore(this.$w.find('.list-toolbar '+before));this.btn_groupify();},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-refresh').click(function(){me.run();});this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
+if(this.new_doctype){this.$w.find('.btn-new').toggle(true).click(function(){newdoc(me.new_doctype);})}else{this.$w.find('.btn-new').remove();}
+if(!me.show_filters){this.$w.find('.btn-filter').remove();}
+if(this.hide_refresh||this.no_refresh){this.$w.find('.btn-refresh').remove();}
+this.btn_groupify();},btn_groupify:function(){var nbtns=this.$w.find('.list-toolbar a').length;if(nbtns==0){this.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
+this.onrun=a0;if(a0&&a0.callback)
+this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
+this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
+args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
+if(this.args)
+$.extend(args,this.args)
+if(this.get_args){$.extend(args,this.get_args());}
+return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
+if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
+this.start+=m;if(values.length>=this.page_length)
+this.$w.find('.btn-more').toggle(true);},add_row:function(){return this.$w.find('.result-list').append('<div class="list-row">').find('.list-row:last').get(0);},refresh:function(){this.run();},add_limits:function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}});wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.listobj.$w.find('.btn-filter').bind('click',function(){me.$w.find('.show_filters').slideToggle();if(!me.filters.length)
+me.add_filter();});this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').slideDown();}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
+values.push(f.get_value());})
+return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
+this.filters=fl;},get_filter:function(fieldname){for(var i in this.filters){if(this.filters[i].field.df.fieldname==fieldname)
+return this.filters[i];}}});wn.ui.Filter=Class.extend({init:function(opts){$.extend(this,opts);this.doctype=this.flist.doctype;this.fields_by_name={};this.make();this.make_options();this.set_events();},make:function(){this.flist.$w.find('.filter_area').append('<div class="list_filter">\
+ <select class="fieldname_select"></select>\
+ <select class="condition">\
+ <option value="=">Equals</option>\
+ <option value="like">Like</option>\
+ <option value=">=">Greater or equals</option>\
+ <option value=">=">Less or equals</option>\
+ <option value=">">Greater than</option>\
+ <option value="<">Less than</option>\
+ <option value="in">In</option>\
+ <option value="!=">Not equals</option>\
+ </select>\
+ <span class="filter_field"></span>\
+ <a class="close">×</a>\
+ </div>');this.$w=this.flist.$w.find('.list_filter:last-child');this.$select=this.$w.find('.fieldname_select');},make_options:function(){if(this.filter_fields){for(var i in this.filter_fields)
+this.add_field_option(this.filter_fields[i])}else{this.render_field_select();}},set_events:function(){var me=this;this.$w.find('.fieldname_select').bind('change',function(){me.set_field(this.value);});this.$w.find('a.close').bind('click',function(){me.$w.css('display','none');var value=me.field.get_value();me.field=null;if(!me.flist.get_filters().length){me.flist.$w.find('.set_filters').toggle(true);me.flist.$w.find('.show_filters').toggle(false);}
+if(value){me.flist.listobj.run();}
+me.flist.update_filters();return false;});me.$w.find('.condition').change(function(){if($(this).val()=='in'){me.set_field(me.field.df.fieldname,'Data');if(!me.field.desc_area)
+me.field.desc_area=$a(me.field.wrapper,'span','help',null,'values separated by comma');}else{me.set_field(me.field.df.fieldname);}});if(me.fieldname){this.set_values(me.fieldname,me.condition,me.value);}else{me.set_field('name');}},set_values:function(fieldname,condition,value){this.set_field(fieldname);if(condition)this.$w.find('.condition').val(condition).change();if(value)this.field.set_input(value)},render_field_select:function(){var me=this;me.table_fields=[];var std_filters=[{fieldname:'name',fieldtype:'Data',label:'ID',parent:me.doctype},{fieldname:'modified',fieldtype:'Date',label:'Last Modified',parent:me.doctype},{fieldname:'owner',fieldtype:'Data',label:'Created By',parent:me.doctype},{fieldname:'_user_tags',fieldtype:'Data',label:'Tags',parent:me.doctype}];$.each(std_filters.concat(fields_list[me.doctype]),function(i,df){me.add_field_option(df);});$.each(me.table_fields,function(i,table_df){if(table_df.options){$.each(fields_list[table_df.options],function(i,df){me.add_field_option(df);});}})},add_field_option:function(df){var me=this;if(me.doctype&&df.parent==me.doctype){var label=df.label;var table=get_label_doctype(me.doctype);if(df.fieldtype=='Table')me.table_fields.push(df);}else{var label=df.label+' ('+df.parent+')';var table=df.parent;}
+if(wn.model.no_value_type.indexOf(df.fieldtype)==-1&&!me.fields_by_name[df.fieldname]){this.$select.append($('<option>',{value:df.fieldname,table:table}).text(label));me.fields_by_name[df.fieldname]=df;}},set_field:function(fieldname,fieldtype){var me=this;var cur=me.field?{fieldname:me.field.df.fieldname,fieldtype:me.field.df.fieldtype}:{}
+var df=me.fields_by_name[fieldname];this.set_fieldtype(df,fieldtype);if(me.field&&cur.fieldname==fieldname&&df.fieldtype==cur.fieldtype){return;}
+me.$w.find('.fieldname_select').val(fieldname);var field_area=me.$w.find('.filter_field').empty().get(0);f=make_field(df,null,field_area,null,0,1);f.df.single_select=1;f.not_in_form=1;f.with_label=0;f.refresh();me.field=f;this.set_default_condition(df,fieldtype);$(me.field.wrapper).find(':input').keydown(function(ev){if(ev.which==13){me.flist.listobj.run();}})},set_fieldtype:function(df,fieldtype){if(df.original_type)
+df.fieldtype=df.original_type;else
+df.original_type=df.fieldtype;df.description='';df.reqd=0;if(fieldtype){df.fieldtype=fieldtype;return;}
+if(df.fieldtype=='Check'){df.fieldtype='Select';df.options='No\nYes';}else if(['Text','Text Editor','Code','Link'].indexOf(df.fieldtype)!=-1){df.fieldtype='Data';}},set_default_condition:function(df,fieldtype){if(!fieldtype){if(df.fieldtype=='Data'){this.$w.find('.condition').val('like');}else{this.$w.find('.condition').val('=');}}},get_value:function(){var me=this;var val=me.field.get_value();var cond=me.$w.find('.condition').val();if(me.field.df.original_type=='Check'){val=(val=='Yes'?1:0);}
+if(cond=='like'){val=val+'%';}
+return[me.$w.find('.fieldname_select option:selected').attr('table'),me.field.df.fieldname,me.$w.find('.condition').val(),cstr(val)];}});
+/*
+ * lib/js/wn/views/container.js
+ */
+wn.provide('wn.pages');wn.provide('wn.views');wn.views.Container=Class.extend({init:function(){this.container=$('#body_div').get(0);this.page=null;this.pagewidth=$('#body_div').width();this.pagemargin=50;},add_page:function(label,onshow,onhide){var page=$('<div class="content"></div>').appendTo(this.container).get(0);if(onshow)
+$(page).bind('show',onshow);if(onshow)
+$(page).bind('hide',onhide);page.label=label;wn.pages[label]=page;return page;},change_to:function(label){if(this.page&&this.page.label==label){return;}
+var me=this;if(label.tagName){var page=label;}else{var page=wn.pages[label];}
+if(!page){console.log('Page not found '+label);return;}
+if(this.page){$(this.page).toggle(false);$(this.page).trigger('hide');}
+this.page=page;$(this.page).fadeIn();$(this.page).trigger('show');this.page._route=window.location.hash;document.title=this.page.label;return this.page;}})
+/*
+ * lib/js/wn/views/doclistview.js
+ */
+wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
+document.title=page.doclistview.label;wn.container.change_to(pagename);})}
+wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
+ <div class="layout-main-section">\
+ <a class="close" onclick="window.history.back();">×</a>\
+ <h1>%(label)s</h1>\
+ <hr>\
+ <div class="wnlist-area"><div class="help">Loading...</div></div>\
+ </div>\
+ <div class="layout-side-section">\
+ <div class="stat-wrapper show-docstatus hide">\
+ <h4>Show</h4>\
+ <div><input data-docstatus="0" type="checkbox" checked="checked" /> Drafts</div>\
+ <div><input data-docstatus="1" type="checkbox" checked="checked" /> Submitted</div>\
+ <div><input data-docstatus="2" type="checkbox" /> Cancelled</div>\
+ </div>\
+ </div>\
+ <div style="clear: both"></div>\
+ </div>',{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,no_result_message:this.make_no_result(),columns:this.listview.fields});this.run();},make_no_result:function(){return repl('<div class="well"><p>No %(doctype_label)s found</p>\
+ %(description)s\
+ <hr>\
+ <p><button class="btn btn-info btn-small"\
+ onclick="wn.set_route(\'Form\', \'%(doctype)s\', \'New %(doctype)s\');"\
+ >Make a new %(doctype_label)s</button>\
+ </p></div>',{doctype_label:get_doctype_label(this.doctype),doctype:this.doctype,description:wn.markdown(locals.DocType[this.doctype].description||'')});},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('<a class="btn btn-small btn-delete">\
+ <i class="icon-remove"></i> Delete</a>',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('<div class="stat-wrapper"><h4>Tags</h4>\
+ <div class="help small"><i>No records tagged.</i><br><br> \
+ To add a tag, open the document and click on \
+ "Add Tag" on the sidebar</div></div>');}
+return;}
+var label=fields[this.doctype][field]?fields[this.doctype][field].label:field;if(label=='_user_tags')label='Tags';var $w=$('<div class="stat-wrapper">\
+ <h4>'+label+'</h4>\
+ <div class="stat-grid">\
+ </div>\
+ </div>');stat=stat.sort(function(a,b){return b[1]-a[1]});var sum=0;$.each(stat,function(i,v){sum=sum+v[1];})
+$.each(stat,function(i,v){me.render_stat_item(i,v,sum,field).appendTo($w.find('.stat-grid'));});$w.appendTo(this.$page.find('.layout-side-section'));},render_stat_item:function(i,v,max,field){var me=this;var args={}
+args.label=v[0];args.width=flt(v[1])/max*100;args.count=v[1];args.field=field;$item=$(repl('<div class="stat-item">\
+ <div class="stat-bar" style="width: %(width)s%"></div>\
+ <div class="stat-label">\
+ <a href="#" data-label="%(label)s" data-field="%(field)s">\
+ %(label)s</a> \
+ (%(count)s)</div>\
+ </div>',args));this.setup_stat_item_click($item);return $item;},setup_stat_item_click:function($item){var me=this;$item.find('a').click(function(){var fieldname=$(this).attr('data-field');var label=$(this).attr('data-label');me.set_filter(fieldname,label);return false;});},set_filter:function(fieldname,label){var filter=this.filter_list.get_filter(fieldname);if(filter){var v=filter.field.get_value();if(v.indexOf(label)!=-1){return false;}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{filter.set_values(fieldname,'in',v+', '+label);}}}else{if(fieldname=='_user_tags'){this.filter_list.add_filter(fieldname,'like','%'+label);}else{this.filter_list.add_filter(fieldname,'=',label);}}
+this.run();}});wn.views.ListView=Class.extend({init:function(doclistview){this.doclistview=doclistview;this.doctype=doclistview.doctype;var t="`tab"+this.doctype+"`.";this.fields=[t+'name',t+'owner',t+'docstatus',t+'_user_tags',t+'modified'];this.stats=['_user_tags'];if(!this.doclistview.can_delete){this.columns=$.map(this.columns,function(v,i){if(v.content!='check')return v});}},columns:[{width:'3%',content:'check'},{width:'4%',content:'avatar'},{width:'3%',content:'docstatus',css:{"text-align":"center"}},{width:'35%',content:'name'},{width:'40%',content:'tags',css:{'color':'#aaa'}},{width:'15%',content:'modified',css:{'text-align':'right','color':'#777'}}],render_column:function(data,parent,opts){var me=this;if(opts.css){$.each(opts.css,function(k,v){$(parent).css(k,v)});}
+if(opts.content.indexOf&&opts.content.indexOf('+')!=-1){$.map(opts.content.split('+'),function(v){me.render_column(data,parent,{content:v});});return;}
+if(typeof opts.content=='function'){opts.content(parent,data);}
+else if(opts.content=='name'){$(parent).html(repl('<a href="#!Form/%(doctype)s/%(name)s">%(name)s</a>',data));}
+else if(opts.content=='avatar'){$(parent).html(repl('<span class="avatar-small"><img src="%(avatar)s" \
+ title="%(fullname)s"/></span>',data));}
+else if(opts.content=='check'){$(parent).html('<input class="list-delete" type="checkbox">');$(parent).find('input').data('name',data.name);}
+else if(opts.content=='docstatus'){$(parent).html(repl('<span class="docstatus"><i class="%(docstatus_icon)s" \
+ title="%(docstatus_title)s"></i></span>',data));}
+else if(opts.content=='tags'){this.add_user_tags(parent,data);}
+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('<span class="bar-outer" style="width: 30px; float: right" \
+ title="%(percent)s% %(label)s">\
+ <span class="bar-inner %(fully_delivered)s" \
+ style="width: %(percent)s%;"></span>\
+ </span>',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('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').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];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
+if(diff==1){data.when='Yesterday'}
+if(diff==2){data.when='2 days ago'}
+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){$('<span class="label label-info" style="cursor: pointer">'
++strip(t)+'</span>').click(function(){me.doclistview.set_filter('_user_tags',$(this).text())}).appendTo(parent);}});}}})
+/*
+ * lib/js/wn/views/pageview.js
+ */
+wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){wn.views.pageview.with_page(name,function(){if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
+wn.container.change_to(name);});}}
+wn.views.Page=Class.extend({init:function(name){this.name=name;var me=this;this.pagedoc=locals.Page[this.name];this.wrapper=wn.container.add_page(this.name);this.wrapper.label=this.pagedoc.title||this.pagedoc.name;this.wrapper.innerHTML=this.pagedoc.content;wn.dom.eval(this.pagedoc.__script||this.pagedoc.script||'');wn.dom.set_style(this.pagedoc.style);this.trigger('onload');$(this.wrapper).bind('show',function(){cur_frm=null;me.trigger('onshow');});},trigger:function(eventname){var me=this;try{if(pscript[eventname+'_'+this.name]){pscript[eventname+'_'+this.name](me.wrapper);}else if(me.wrapper[eventname]){me.wrapper[eventname](me.wrapper);}}catch(e){console.log(e);}}})
+/*
+ * lib/js/wn/views/formview.js
+ */
+wn.provide('wn.views.formview');wn.views.formview={show:function(dt,dn){if(wn.model.new_names[dn])
+dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
+wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})}}
+/*
+ * lib/js/wn/views/reportview.js
+ */
+wn.views.reportview={show:function(dt,rep_name){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();}
+_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload)
+onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
+rb.dt.run();}
+if(!rb.forbidden){wn.container.change_to('Report Builder');}});}}
+/*
+ * lib/js/wn/request.js
+ */
+wn.provide('wn.request');wn.request.url='index.cgi';wn.request.prepare=function(opts){if(opts.btn)$(opts.btn).set_working();if(opts.show_spinner)set_loading();if(opts.freeze)freeze();if(!opts.args.cmd){console.log(opts)
+throw"Incomplete Request";}}
+wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('redirect_to_login()',3000);return;}
+if(r.server_messages)msgprint(r.server_messages)
+if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);}
+wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});msgprint('Unable to complete request: '+textStatus)
+if(opts.error)opts.error(xhr)}})}
+wn.call=function(opts){var args=$.extend({},opts.args)
+if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;}
+for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}}
+wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,freeze:opts.freeze,show_spinner:!opts.no_spinner});}
+/*
* lib/js/core.js
*/
if(!console){var console={log:function(txt){errprint(txt);}}}
wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
+
/*
* lib/js/legacy/globals.js
*/
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
-wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
+wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;
/*
* lib/js/legacy/utils/datatype.js
*/
-var startup_list=[];wn.utils.full_name=function(fn,ln){return fn+(ln?' ':'')+(ln?ln:'')}
+wn.utils.full_name=function(fn,ln){return fn+(ln?' ':'')+(ln?ln:'')}
function fmt_money(v){if(v==null||v=='')return'0.00';v=(v+'').replace(/,/g,'');v=parseFloat(v);if(isNaN(v)){return'';}else{var cp=wn.control_panel;var val=2;if(cp.currency_format=='Millions')val=3;v=v.toFixed(2);var delimiter=",";amount=v+'';var a=amount.split('.',2)
var d=a[1];var i=parseInt(a[0]);if(isNaN(i)){return'';}
var minus='';if(v<0){minus='-';}
@@ -198,7 +408,7 @@
function nth(number){number=cint(number);var s='th';if((number+'').substr(-1)=='1')s='st';if((number+'').substr(-1)=='2')s='nd';if((number+'').substr(-1)=='3')s='rd';return number+s;}
function flt(v,decimals){if(v==null||v=='')return 0;v=(v+'').replace(/,/g,'');v=parseFloat(v);if(isNaN(v))
v=0;if(decimals!=null)
-return v.toFixed(decimals);return v;}
+return parseFloat(v.toFixed(decimals));return v;}
function esc_quotes(s){if(s==null)s='';return s.replace(/'/,"\'");}
var crop=function(s,len){if(s.length>len)
return s.substr(0,len-3)+'...';else
@@ -239,7 +449,7 @@
var month_list=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];var month_last={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
var month_list_full=['January','February','March','April','May','June','July','August','September','October','November','December'];var week_list=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var week_list_full=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];function int_to_str(i,len){i=''+i;if(i.length<len)for(c=0;c<(len-i.length);c++)i='0'+i;return i}
wn.datetime={str_to_obj:function(d){if(!d)return new Date();var tm=[null,null];if(d.search(' ')!=-1){var tm=d.split(' ')[1].split(':');var d=d.split(' ')[0];}
-if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
+if(d.search('-')!=-1){var t=d.split('-');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else if(d.search('/')!=-1){var t=d.split('/');return new Date(t[0],t[1]-1,t[2],tm[0],tm[1]);}else{return new Date();}},obj_to_str:function(d){return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-'+int_to_str(d.getDate(),2);},obj_to_user:function(d){return dateutil.str_to_user(dateutil.obj_to_str(d));},get_diff:function(d1,d2){if(typeof d1=='string')d1=dateutil.str_to_obj(d1);if(typeof d2=='string')d2=dateutil.str_to_obj(d2);return((d1-d2)/86400000);},get_day_diff:function(d1,d2){return dateutil.get_diff(new Date(d1.getYear(),d1.getMonth(),d1.getDate(),0,0),new Date(d2.getYear(),d2.getMonth(),d2.getDate(),0,0))},add_days:function(d,days){d.setTime(d.getTime()+(days*24*60*60*1000));return d},add_months:function(d,months){dt=dateutil.str_to_obj(d)
new_dt=new Date(dt.getFullYear(),dt.getMonth()+months,dt.getDate())
if(new_dt.getDate()!=dt.getDate()){return dateutil.month_end(new Date(dt.getFullYear(),dt.getMonth()+months,1))}
return dateutil.obj_to_str(new_dt);},month_start:function(){var d=new Date();return d.getFullYear()+'-'+int_to_str(d.getMonth()+1,2)+'-01';},month_end:function(d){if(!d)var d=new Date();var m=d.getMonth()+1;var y=d.getFullYear();last_date=month_last[m];if(m==2&&(y%4)==0&&((y%100)!=0||(y%400)==0))
@@ -280,13 +490,13 @@
*/
wn.dom.set_unique_id=function(ele){var id='unique-'+wn.dom.id_count;ele.setAttribute('id',id);wn.dom.id_count++;return id;}
wn.tinymce={add_simple:function(ele,height){if(ele.myid){tinyMCE.execCommand('mceAddControl',true,ele.myid);return;}
-ele.myid=wn.dom.set_unique_id(ele);$(ele).tinymce({script_url:'lib/js/legacy/tiny_mce_33/tiny_mce.js',height:height?height:'200px',theme:"advanced",theme_advanced_buttons1:"bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,outdent,indent,link,unlink,forecolor,backcolor,code,",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_path:false,theme_advanced_resizing:false});},remove:function(ele){tinyMCE.execCommand('mceRemoveControl',true,ele.myid);},get_value:function(ele){return tinymce.get(ele.myid).getContent();}}
+ele.myid=wn.dom.set_unique_id(ele);$(ele).tinymce({script_url:'lib/js/lib/tiny_mce_33/tiny_mce.js',height:height?height:'200px',theme:"advanced",theme_advanced_buttons1:"bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,outdent,indent,link,unlink,forecolor,backcolor,code,",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_path:false,theme_advanced_resizing:false});},remove:function(ele){tinyMCE.execCommand('mceRemoveControl',true,ele.myid);},get_value:function(ele){return tinymce.get(ele.myid).getContent();}}
wn.ele={link:function(args){var span=$a(args.parent,'span','link_type',args.style);span.loading_img=$a(args.parent,'img','',{margin:'0px 4px -2px 4px',display:'none'});span.loading_img.src='lib/images/ui/button-load.gif';span.innerHTML=args.label;span.user_onclick=args.onclick;span.onclick=function(){if(!this.disabled)this.user_onclick(this);}
span.set_working=function(){this.disabled=1;$di(this.loading_img);}
span.done_working=function(){this.disabled=0;$dh(this.loading_img);}
return span;}}
function $ln(parent,label,onclick,style){return wn.ele.link({parent:parent,label:label,onclick:onclick,style:style})}
-function $btn(parent,label,onclick,style,css_class,is_ajax){wn.require('lib/js/wn/ui/button.js');if(css_class==='green')css_class='btn-primary';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
+function $btn(parent,label,onclick,style,css_class,is_ajax){if(css_class==='green')css_class='btn-info';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
$item_normal=function(ele){$y(ele,{padding:'6px 8px',cursor:'pointer',marginRight:'8px',whiteSpace:'nowrap',overflow:'hidden',borderBottom:'1px solid #DDD'});$bg(ele,'#FFF');$fg(ele,'#000');}
$item_active=function(ele){$bg(ele,'#FE8');$fg(ele,'#000');}
$item_selected=function(ele){$bg(ele,'#777');$fg(ele,'#FFF');}
@@ -294,6 +504,9 @@
$.fn.done_working=function(){var ele=this.get(0);ele.disabled=0;if(ele.loading_img){$dh(ele.loading_img)};}})(jQuery);function set_opacity(ele,ieop){var op=ieop/100;if(ele.filters){try{ele.filters.item("DXImageTransform.Microsoft.Alpha").opacity=ieop;}catch(e){ele.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+ieop+')';}}else{ele.style.opacity=op;}}
$br=function(ele,r,corners){if(corners){var cl=['top-left','top-right','bottom-right','bottom-left'];for(var i=0;i<4;i++){if(corners[i]){$(ele).css('-moz-border-radius-'+cl[i].replace('-',''),r).css('-webkit-'+cl[i]+'-border-radius',r);}}}else{$(ele).css('-moz-border-radius',r).css('-webkit-border-radius',r).css('border-radius',r);}}
$bs=function(ele,r){$(ele).css('-moz-box-shadow',r).css('-webkit-box-shadow',r).css('box-shadow',r);}
+function SelectWidget(parent,options,width,editable,bg_color){var me=this;this.inp=$a(parent,'select');if(options)add_sel_options(this.inp,options);if(width)$y(this.inp,{width:width});this.set_width=function(w){$y(this.inp,{width:w})};this.set_options=function(o){add_sel_options(this.inp,o);}
+this.inp.onchange=function(){if(me.onchange)me.onchange(this);}
+return;}
function empty_select(s){if(s.custom_select){s.empty();return;}
if(s.inp)s=s.inp;if(s){var tmplen=s.length;for(var i=0;i<tmplen;i++)s.options[0]=null;}}
function sel_val(s){if(s.custom_select){return s.inp.value?s.inp.value:'';}
@@ -323,12 +536,9 @@
d.style.display=t;}
function $di(d){if(d&&d.substr)d=$i(d);if(d)d.style.display='inline';}
function $i(id){if(!id)return null;if(id&&id.appendChild)return id;return document.getElementById(id);}
-function $t(parent,txt){if(parent.substr)parent=$i(parent);return parent.appendChild(document.createTextNode(txt));}
function $w(e,w){if(e&&e.style&&w)e.style.width=w;}
function $h(e,h){if(e&&e.style&&h)e.style.height=h;}
function $bg(e,w){if(e&&e.style&&w)e.style.backgroundColor=w;}
-function $fg(e,w){if(e&&e.style&&w)e.style.color=w;}
-function $op(e,w){if(e&&e.style&&w){set_opacity(e,w);}}
function $y(ele,s){if(ele&&s){for(var i in s)ele.style[i]=s[i];};return ele;}
function $yt(tab,r,c,s){var rmin=r;var rmax=r;if(r=='*'){rmin=0;rmax=tab.rows.length-1;}
if(r.search&&r.search('-')!=-1){r=r.split('-');rmin=cint(r[0]);rmax=cint(r[1]);}
@@ -336,8 +546,7 @@
if(c.search&&c.search('-')!=-1){c=c.split('-');rmin=cint(c[0]);rmax=cint(c[1]);}
for(var ri=rmin;ri<=rmax;ri++){for(var ci=cmin;ci<=cmax;ci++)
$y($td(tab,ri,ci),s);}}
-function set_style(txt){var se=document.createElement('style');se.type="text/css";if(se.styleSheet){se.styleSheet.cssText=txt;}else{se.appendChild(document.createTextNode(txt));}
-document.getElementsByTagName('head')[0].appendChild(se);}
+function set_style(txt){wn.dom.set_style(txt);}
function make_table(parent,nr,nc,table_width,widths,cell_style,table_style){var t=$a(parent,'table');t.style.borderCollapse='collapse';if(table_width)t.style.width=table_width;if(cell_style)t.cell_style=cell_style;for(var ri=0;ri<nr;ri++){var r=t.insertRow(ri);for(var ci=0;ci<nc;ci++){var c=r.insertCell(ci);if(ri==0&&widths&&widths[ci]){c.style.width=widths[ci];}
if(cell_style){for(var s in cell_style)c.style[s]=cell_style[s];}}}
t.append_row=function(){return append_row(this);}
@@ -354,54 +563,26 @@
function get_scroll_top(){var st=0;if(document.documentElement&&document.documentElement.scrollTop)
st=document.documentElement.scrollTop;else if(document.body&&document.body.scrollTop)
st=document.body.scrollTop;return st;}
-function get_cookie(c){var t=""+document.cookie;var ind=t.indexOf(c);if(ind==-1||c=="")return"";var ind1=t.indexOf(';',ind);if(ind1==-1)ind1=t.length;return unescape(t.substring(ind+c.length+1,ind1));}
wn.urllib={get_arg:function(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null)
return"";else
return decodeURIComponent(results[1]);},get_dict:function(){var d={}
var t=window.location.href.split('?')[1];if(!t)return d;if(t.indexOf('#')!=-1)t=t.split('#')[0];if(!t)return d;t=t.split('&');for(var i=0;i<t.length;i++){var a=t[i].split('=');d[decodeURIComponent(a[0])]=decodeURIComponent(a[1]);}
return d;},get_base_url:function(){var url=window.location.href.split('#')[0].split('?')[0].split('index.cgi')[0];if(url.substr(url.length-1,1)=='/')url=url.substr(0,url.length-1)
return url},get_file_url:function(file_id){return repl('files/%(fn)s',{fn:file_id})}}
-get_url_arg=wn.urllib.get_arg;get_url_dict=wn.urllib.get_dict;var user_img={}
-var user_img_queue={};var user_img_loading=[];set_user_img=function(img,username,get_latest,img_id){function set_it(i){if(user_img[username]=='no_img_m')
-i.src='lib/images/ui/no_img_m.gif';else if(user_img[username]=='no_img_f')
-i.src='lib/images/ui/no_img_f.gif';else{ac_id=wn.control_panel.account_id;i.src=repl('cgi-bin/getfile.cgi?ac=%(ac)s&name=%(fn)s',{fn:user_img[username],ac:ac_id});}}
-if(img_id){user_img[username]=img_id;set_it(img);return;}
-if(user_img[username]&&!get_latest){set_it(img);}else{if(in_list(user_img_loading,username)){if(!user_img_queue[username])
-user_img_queue[username]=[];user_img_queue[username].push(img);return;}
-$c('webnotes.profile.get_user_img',{username:username},function(r,rt){delete user_img_loading[user_img_loading.indexOf(username)];user_img[username]=r.message;if(user_img_queue[username]){var q=user_img_queue[username];for(var i in q){set_it(q[i]);}}
-set_it(img);},null,1);user_img_loading.push(username);}}
+get_url_arg=wn.urllib.get_arg;get_url_dict=wn.urllib.get_dict;
/*
* lib/js/legacy/utils/handler.js
*/
-var outUrl="index.cgi";var NULL_CHAR='^\5*';function checkResponse(r,on_timeout,no_spinner,freeze_msg){try{if(r.readyState==4&&r.status==200)return true;else return false;}catch(e){msgprint("error:Request timed out, try again");if(on_timeout)
-on_timeout();hide_loading();if(freeze_msg)
-unfreeze();return false;}}
-var pending_req=0;function newHttpReq(){if(!$.browser.msie)
-var r=new XMLHttpRequest();else if(window.ActiveXObject)
-var r=new ActiveXObject("Microsoft.XMLHTTP");return r;}
-function $c(command,args,fn,on_timeout,no_spinner,freeze_msg,btn){var req=newHttpReq();ret_fn=function(){if(checkResponse(req,on_timeout,no_spinner,freeze_msg)){if(btn)$(btn).done_working();if(!no_spinner)
-hide_loading();var rtxt=req.responseText;try{var r=JSON.parse(rtxt);}catch(e){msgprint('Handler Exception:'+rtxt);return;}
-if(freeze_msg)unfreeze();if(!validate_session(r,rtxt))return;if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.server_messages){msgprint(r.server_messages);};if(r.docs){LocalDB.sync(r.docs);}
-saveAllowed=true;if(fn)fn(r,rtxt);}}
-if(btn)$(btn).set_working();req.onreadystatechange=ret_fn;req.open("POST",outUrl,true);req.setRequestHeader("ENCTYPE","multipart/form-data");req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");args['cmd']=command;req.send(makeArgString(args));if(!no_spinner)set_loading();if(freeze_msg)freeze(freeze_msg,1);}
-function validate_session(r,rt){if(r.message=='Logged In'){start_sid=get_cookie('sid');return true;}
-if(start_sid&&start_sid!=get_cookie('sid')&&user&&user!='Guest'){page_body.set_session_changed();return;}
-if(r.exc&&r.session_status=='Session Expired'){resume_session();return;}
-if(r.exc&&r.session_status=='Logged Out'){msgprint('You have been logged out');setTimeout('redirect_to_login()',3000);return;}
-if(r.exc&&r.exc_type&&r.exc_type=='PermissionError'){loadpage('_home');}
-return true;}
-function $c_obj(doclist,method,arg,call_back,no_spinner,freeze_msg,btn){var args={'method':method,'arg':(typeof arg=='string'?arg:JSON.stringify(arg))}
-if(typeof doclist=='string')args.doctype=doclist;else args.docs=compress_doclist(doclist)
-$c('runserverobj',args,call_back,null,no_spinner,freeze_msg,btn);}
-function $c_page(module,page,method,arg,call_back,no_spinner,freeze_msg,btn){if(arg&&!arg.substr)arg=JSON.stringify(arg);$c(module+'.page.'+page+'.'+page+'.'+method,{'arg':arg},call_back,null,no_spinner,freeze_msg,btn);}
-wn.call=function(args){if(!args.args)args.args={};if(args.module&&args.page){$c_page(args.module,args.page,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else if(args.docs){$c_obj(args.doc,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else{$c(args.method,args.args,args.callback,false,args.no_spinner,false,args.btn);}}
+function $c(command,args,callback,error,no_spinner,freeze_msg,btn){wn.request.call({args:$.extend(args,{cmd:command}),success:callback,error:error,btn:btn,freeze:freeze_msg,show_spinner:!no_spinner})}
+function $c_obj(doclist,method,arg,callback,no_spinner,freeze_msg,btn){if(arg&&typeof arg!='string')arg=JSON.stringify(arg);args={cmd:'runserverobj',arg:arg,method:method};if(typeof doclist=='string')
+args.doctype=doclist;else
+args.docs=compress_doclist(doclist)
+wn.request.call({args:args,success:callback,btn:btn,freeze:freeze_msg,show_spinner:!no_spinner});}
+function $c_page(module,page,method,arg,callback,no_spinner,freeze_msg,btn){if(arg&&typeof arg!='string')arg=JSON.stringify(arg);wn.request.call({args:{cmd:module+'.page.'+page+'.'+page+'.'+method,arg:arg,method:method},success:callback,btn:btn,freeze:freeze_msg,show_spinner:!no_spinner});}
function $c_obj_csv(doclist,method,arg){var args={}
args.cmd='runserverobj';args.as_csv=1;args.method=method;args.arg=arg;if(doclist.substr)
args.doctype=doclist;else
-args.docs=compress_doclist(doclist);open_url_post(outUrl,args);}
-function my_eval(co){var w=window;if(!w.execScript){if(/Gecko/.test(navigator.userAgent)){eval(co,w);}else{eval.call(w,co);}}else{w.execScript(co);}}
-function makeArgString(dict){var varList=[];for(key in dict){varList[varList.length]=key+'='+encodeURIComponent(dict[key]);}
-return varList.join('&');}
+args.docs=compress_doclist(doclist);open_url_post(wn.request.url,args);}
function open_url_post(URL,PARAMS,new_window){var temp=document.createElement("form");temp.action=URL;temp.method="POST";temp.style.display="none";if(new_window){temp.target='_blank';}
for(var x in PARAMS){var opt=document.createElement("textarea");opt.name=x;opt.value=PARAMS[x];temp.appendChild(opt);}
document.body.appendChild(temp);temp.submit();return temp;}
@@ -438,22 +619,22 @@
*/
var no_value_fields=['Section Break','Column Break','HTML','Table','FlexTable','Button','Image'];var codeid=0;var code_editors={};function Field(){this.with_label=1;}
Field.prototype.make_body=function(){var ischk=(this.df.fieldtype=='Check'?1:0);if(this.parent)
-this.wrapper=$a(this.parent,'div');else
-this.wrapper=document.createElement('div');this.label_area=$a(this.wrapper,'div','',{margin:'8px 0px 2px 0px'});if(ischk&&!this.in_grid){this.input_area=$a(this.label_area,'span','',{marginRight:'4px'});this.disp_area=$a(this.label_area,'span','',{marginRight:'4px'});}
-if(this.with_label){this.label_span=$a(this.label_area,'span','field_label')
+this.wrapper=$a(this.parent,(this.with_label?'div':'span'));else
+this.wrapper=document.createElement((this.with_label?'div':'span'));this.label_area=$a(this.wrapper,'div','',{margin:'0px 0px 2px 0px'});if(ischk&&!this.in_grid){this.input_area=$a(this.label_area,'span','',{marginRight:'4px'});this.disp_area=$a(this.label_area,'span','',{marginRight:'4px'});}
+if(this.with_label){this.label_span=$a(this.label_area,'span','small')
this.label_icon=$a(this.label_area,'img','',{margin:'-3px 4px -3px 4px'});$dh(this.label_icon);this.label_icon.src='lib/images/icons/error.gif';this.label_icon.title='Mandatory value needs to be entered';this.suggest_icon=$a(this.label_area,'img','',{margin:'-3px 4px -3px 0px'});$dh(this.suggest_icon);this.suggest_icon.src='lib/images/icons/bullet_arrow_down.png';this.suggest_icon.title='With suggestions';}else{this.label_span=$a(this.label_area,'span','',{marginRight:'4px'})
$dh(this.label_area);}
-if(!this.input_area){this.input_area=$a(this.wrapper,'div');this.disp_area=$a(this.wrapper,'div');}
-if(this.in_grid){if(this.label_area)$dh(this.label_area);}else{this.input_area.className='input_area';$y(this.wrapper,{marginBottom:'4px'});this.set_description();}
+if(!this.input_area){this.input_area=$a(this.wrapper,(this.with_label?'div':'span'));this.disp_area=$a(this.wrapper,(this.with_label?'div':'span'));}
+if(this.in_grid){if(this.label_area)$dh(this.label_area);}else{this.input_area.className='input_area';$y(this.wrapper,{marginBottom:'9px'});this.set_description();}
if(this.onmake)this.onmake();}
Field.prototype.set_max_width=function(){var no_max=['Code','Text Editor','Text','Table','HTML']
if(this.wrapper&&this.layout_cell&&this.layout_cell.parentNode.cells&&this.layout_cell.parentNode.cells.length==1&&!in_list(no_max,this.df.fieldtype)){$y(this.wrapper,{paddingRight:'50%'});}}
Field.prototype.set_label=function(){if(this.with_label&&this.label_area&&this.label!=this.df.label){this.label_span.innerHTML=this.df.label;this.label=this.df.label;}}
-Field.prototype.set_description=function(){if(this.df.description){var p=in_list(['Text Editor','Code','Check'],this.df.fieldtype)?this.label_area:this.wrapper;this.desc_area=$a(p,'div','field_description','',this.df.description)
+Field.prototype.set_description=function(){if(this.df.description){var p=in_list(['Text Editor','Code','Check'],this.df.fieldtype)?this.label_area:this.wrapper;this.desc_area=$a(p,'div','help small','',this.df.description)
if(in_list(['Text Editor','Code'],this.df.fieldtype))
-$(this.desc_area).addClass('field_description_top');}}
+$(this.desc_area).addClass('help small');}}
Field.prototype.get_status=function(){if(this.in_filter)this.not_in_form=this.in_filter;if(this.not_in_form){return'Write';}
-var fn=this.df.fieldname?this.df.fieldname:this.df.label;this.df=get_field(this.doctype,fn,this.docname);if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
+if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
ret='None';if(cint(this.df.hidden))
ret='None';if(ret=='Write'&&cint(cur_frm.doc.docstatus)>0)ret='Read';var a_o_s=cint(this.df.allow_on_submit);if(a_o_s&&(this.in_grid||(this.frm&&this.frm.not_in_container))){a_o_s=null;if(this.in_grid)a_o_s=this.grid.field.df.allow_on_submit;if(this.frm&&this.frm.not_in_container){a_o_s=cur_grid.field.df.allow_on_submit;}}
if(cur_frm.editable&&a_o_s&&cint(cur_frm.doc.docstatus)>0&&!this.df.hidden){tmp_perm=get_perm(cur_frm.doctype,cur_frm.docname,1);if(tmp_perm[this.df.permlevel]&&tmp_perm[this.df.permlevel][WRITE])ret='Write';}
@@ -479,8 +660,7 @@
Field.prototype.refresh_label_icon=function(){if(this.df.reqd){if(this.get_value&&is_null(this.get_value())){if(this.label_icon)$ds(this.label_icon);$(this.txt?this.txt:this.input).addClass('field-to-update')}else{if(this.label_icon)$dh(this.label_icon);$(this.txt?this.txt:this.input).removeClass('field-to-update')}}}
Field.prototype.set=function(val){if(this.not_in_form)
return;if((!this.docname)&&this.grid){this.docname=this.grid.add_newrow();}
-if(in_list(['Data','Text','Small Text','Code'],this.df.fieldtype))
-val=clean_smart_quotes(val);var set_val=val;if(this.validate)set_val=this.validate(val);_f.set_value(this.doctype,this.docname,this.df.fieldname,set_val);this.value=val;}
+var set_val=val;if(this.validate)set_val=this.validate(val);_f.set_value(this.doctype,this.docname,this.df.fieldname,set_val);this.value=val;}
Field.prototype.set_input=function(val){this.value=val;if(this.input&&this.input.set_input){if(val==null)this.input.set_input('');else this.input.set_input(val);}
var disp_val=val;if(val==null)disp_val='';this.set_disp(disp_val);}
Field.prototype.run_trigger=function(){this.refresh_label_icon();if(this.df.reqd&&this.get_value&&!is_null(this.get_value())&&this.set_as_error)
@@ -497,15 +677,15 @@
if(this.input.focus){try{this.input.focus();}catch(e){}}}
if(this.txt){try{this.txt.focus();}catch(e){}
this.txt.field_object=this;}}
-function DataField(){}DataField.prototype=new Field();DataField.prototype.make_input=function(){var me=this;this.input=$a_input(this.input_area,this.df.fieldtype=='Password'?'password':'text');this.get_value=function(){var v=this.input.value;if(this.validate)v=this.validate(v);return v;}
-this.input.name=this.df.fieldname;this.input.onchange=function(){if(!me.last_value)me.last_value='';if(me.validate)
-me.input.value=me.validate(me.input.value);me.set(me.input.value);if(me.format_input)
-me.format_input();if(in_list(['Currency','Float','Int'],me.df.fieldtype)){if(flt(me.last_value)==flt(me.input.value)){me.last_value=me.input.value;return;}}
-me.last_value=me.input.value;me.run_trigger();}
+function DataField(){}DataField.prototype=new Field();DataField.prototype.make_input=function(){var me=this;this.input=$a_input(this.input_area,this.df.fieldtype=='Password'?'password':'text');this.get_value=function(){var v=this.input.value;if(this.validate)
+v=this.validate(v);return v;}
+this.input.name=this.df.fieldname;$(this.input).change(function(){me.set_value($(this).val());});this.set_value=function(val){if(!me.last_value)me.last_value='';if(me.validate){val=me.validate(val);me.input.value=val;}
+me.set(val);if(me.format_input)
+me.format_input();if(in_list(['Currency','Float','Int'],me.df.fieldtype)){if(flt(me.last_value)==flt(val)){me.last_value=val;return;}}
+me.last_value=val;me.run_trigger();}
this.input.set_input=function(val){if(val==null)val='';me.input.value=val;if(me.format_input)me.format_input();}
-if(this.df.options=='Suggest'){wn.require('lib/js/legacy/widgets/autosuggest.js');if(this.suggest_icon)$di(this.suggest_icon);this.set_get_query=function(){}
-this.get_query=function(doc,dt,dn){return repl('SELECT DISTINCT `%(fieldname)s` FROM `tab%(dt)s` WHERE `%(fieldname)s` LIKE "%s" LIMIT 50',{fieldname:me.df.fieldname,dt:me.df.parent})}
-var opts={script:'',json:true,maxresults:10,link_field:this};this.as=new AutoSuggest(this.input,opts);}}
+if(this.df.options=='Suggest'){if(this.suggest_icon)$di(this.suggest_icon);$(me.input).autocomplete({source:function(request,response){wn.call({method:'webnotes.widgets.search.search_link',args:{'txt':request.term,'dt':me.df.options,'query':repl('SELECT DISTINCT `%(fieldname)s` FROM \
+ `tab%(dt)s` WHERE `%(fieldname)s` LIKE "%s" LIMIT 50',{fieldname:me.df.fieldname,dt:me.df.parent})},callback:function(r){response(r.results);}});},select:function(event,ui){me.set_input_value(ui.item.value);return false;}});}}
DataField.prototype.validate=function(v){if(this.df.options=='Phone'){if(v+''=='')return'';v1=''
v=v.replace(/ /g,'').replace(/-/g,'').replace(/\(/g,'').replace(/\)/g,'');if(v&&v.substr(0,1)=='+'){v1='+';v=v.substr(1);}
if(v&&v.substr(0,2)=='00'){v1+='00';v=v.substr(2);}
@@ -518,7 +698,7 @@
HTMLField.prototype=new Field();HTMLField.prototype.with_label=0;HTMLField.prototype.set_disp=function(val){this.disp_area.innerHTML=val;}
HTMLField.prototype.set_input=function(val){if(val)this.set_disp(val);}
HTMLField.prototype.onrefresh=function(){this.set_disp(this.df.options?this.df.options:'');}
-var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=wn.control_panel.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');wn.require('lib/css/legacy/jquery-ui.css');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
+var datepicker_active=0;function DateField(){}DateField.prototype=new Field();DateField.prototype.make_input=function(){var me=this;this.user_fmt=wn.control_panel.date_format;if(!this.user_fmt)this.user_fmt='dd-mm-yy';this.input=$a(this.input_area,'input');$(this.input).datepicker({dateFormat:me.user_fmt.replace('yyyy','yy'),altFormat:'yy-mm-dd',changeYear:true,beforeShow:function(input,inst){datepicker_active=1},onClose:function(dateText,inst){datepicker_active=0;if(_f.cur_grid_cell)
_f.cur_grid_cell.grid.cell_deselect();}});var me=this;me.input.onchange=function(){if(this.value==null)this.value='';if(!this.not_in_form)
me.set(dateutil.user_to_str(me.input.value));me.run_trigger();}
me.input.set_input=function(val){if(val==null)val='';else val=dateutil.str_to_user(val);me.input.value=val;}
@@ -529,23 +709,26 @@
var t=v.split('-');if(t.length!=3){return this.clear();}
else if(cint(t[1])>12||cint(t[1])<1){return this.clear();}
else if(cint(t[2])>31||cint(t[2])<1){return this.clear();}
-return v;};var _link_onchange_flag=null;function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'icon-search','icon-play','icon-plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)
+return v;};function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'icon-search','icon-play','icon-plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)
$(me.btn2).css('display','inline-block');else $dh(me.btn2);}}
-me.txt.field_object=this;me.set_onchange();me.input.set_input=function(val){if(val==undefined)val='';me.txt.value=val;}
+me.txt.field_object=this;me.input.set_input=function(val){if(val==undefined)val='';me.txt.value=val;}
me.get_value=function(){return me.txt.value;}
-wn.require('lib/js/legacy/widgets/autosuggest.js');var opts={script:'',json:true,maxresults:10,link_field:me};this.as=new AutoSuggest(me.txt,opts);}
+$(me.txt).autocomplete({source:function(request,response){wn.call({method:'webnotes.widgets.search.search_link',args:{'txt':request.term,'dt':me.df.options,'query':me.get_custom_query()},callback:function(r){response(r.results);},});},select:function(event,ui){me.set_input_value(ui.item.value);return false;}}).data('autocomplete')._renderItem=function(ul,item){return $('<li></li>').data('item.autocomplete',item).append(repl('<a>%(label)s<br><span style="font-size:10px">%(info)s</span></a>',item)).appendTo(ul);};}
+LinkField.prototype.get_custom_query=function(){this.set_get_query();if(this.get_query){if(cur_frm)
+var doc=locals[cur_frm.doctype][cur_frm.docname];return this.get_query(doc,this.doctype,this.docname);}}
LinkField.prototype.setup_buttons=function(){var me=this;me.btn.onclick=function(){selector.set(me,me.df.options,me.df.label);selector.show(me.txt);}
if(me.btn1)me.btn1.onclick=function(){if(me.txt.value&&me.df.options){loaddoc(me.df.options,me.txt.value);}}
me.can_create=0;if((!me.not_in_form)&&in_list(profile.can_create,me.df.options)){me.can_create=1;me.btn2.onclick=function(){var on_save_callback=function(new_rec){if(new_rec){var d=_f.calling_doc_stack.pop();locals[d[0]][d[1]][me.df.fieldname]=new_rec;me.refresh();if(me.grid)me.grid.refresh();me.run_trigger();}}
_f.calling_doc_stack.push([me.doctype,me.docname]);new_doc(me.df.options,me.on_new,1,on_save_callback,me.doctype,me.docname,me.frm.not_in_container);}}else{$dh(me.btn2);$y($td(me.tab,0,2),{width:'0px'});}}
-LinkField.prototype.set_onchange=function(){var me=this;me.txt.onchange=function(e){if(cur_autosug)return;if(_link_onchange_flag){return;}
-_link_onchange_flag=1;me.refresh_label_icon();if(me.not_in_form){_link_onchange_flag=0;return;}
-if(cur_frm){if(me.txt.value==locals[me.doctype][me.docname][me.df.fieldname]){me.set(me.txt.value);me.run_trigger();setTimeout('_link_onchange_flag = 0',500);return;}}
-me.set(me.txt.value);if(_f.cur_grid_cell)
-_f.cur_grid_cell.grid.cell_deselect();if(!me.txt.value){me.run_trigger();setTimeout('_link_onchange_flag = 0',500);return;}
+LinkField.prototype.set_input_value=function(val){var me=this;me.refresh_label_icon();if(me.not_in_form){$(this.txt).val(val);return;}
+if(cur_frm){if(val==locals[me.doctype][me.docname][me.df.fieldname]){me.set(val);me.run_trigger();return;}}
+me.set(val);if(_f.cur_grid_cell)
+_f.cur_grid_cell.grid.cell_deselect();if(!val){me.run_trigger();return;}
var fetch='';if(cur_frm.fetch_dict[me.df.fieldname])
-fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':me.txt.value,'options':me.df.options,'fetch':fetch},function(r,rt){setTimeout('_link_onchange_flag = 0',500);if(selector&&selector.display)return;if(r.message=='Ok'){if(r.fetch_values)me.set_fetch_values(r.fetch_values);me.run_trigger();}else{var astr='';if(in_list(profile.can_create,me.df.options))astr=repl('<br><br><span class="link_type" onclick="newdoc(\'%(dt)s\')">Click here</span> to create a new %(dtl)s',{dt:me.df.options,dtl:get_doctype_label(me.df.options)})
-msgprint(repl('error:<b>%(val)s</b> is not a valid %(dt)s.<br><br>You must first create a new %(dt)s <b>%(val)s</b> and then select its value. To find an existing %(dt)s, click on the magnifying glass next to the field.%(add)s',{val:me.txt.value,dt:get_doctype_label(me.df.options),add:astr}));me.txt.value='';me.set('');}});}}
+fetch=cur_frm.fetch_dict[me.df.fieldname].columns.join(', ');$c('webnotes.widgets.form.utils.validate_link',{'value':val,'options':me.df.options,'fetch':fetch},function(r,rt){if(selector&&selector.display)return;if(r.message=='Ok'){if($(me.txt).val()!=val){me.set_input(val);}
+if(r.fetch_values)
+me.set_fetch_values(r.fetch_values);me.run_trigger();}else{var astr='';if(in_list(profile.can_create,me.df.options))astr=repl('<br><br><span class="link_type" onclick="newdoc(\'%(dt)s\')">Click here</span> to create a new %(dtl)s',{dt:me.df.options,dtl:get_doctype_label(me.df.options)})
+msgprint(repl('error:<b>%(val)s</b> is not a valid %(dt)s.<br><br>You must first create a new %(dt)s <b>%(val)s</b> and then select its value. To find an existing %(dt)s, click on the magnifying glass next to the field.%(add)s',{val:me.txt.value,dt:get_doctype_label(me.df.options),add:astr}));me.txt.value='';me.set('');}});}
LinkField.prototype.set_fetch_values=function(fetch_values){var fl=cur_frm.fetch_dict[this.df.fieldname].fields;var changed_fields=[];for(var i=0;i<fl.length;i++){if(locals[this.doctype][this.docname][fl[i]]!=fetch_values[i]){locals[this.doctype][this.docname][fl[i]]=fetch_values[i];if(!this.grid){refresh_field(fl[i]);changed_fields.push(fl[i]);}}}
for(i=0;i<changed_fields.length;i++){if(cur_frm.fields_dict[changed_fields[i]])
cur_frm.fields_dict[changed_fields[i]].run_trigger();}
@@ -553,7 +736,8 @@
LinkField.prototype.set_get_query=function(){if(this.get_query)return;if(this.grid){var f=this.grid.get_field(this.df.fieldname);if(f.get_query)this.get_query=f.get_query;}}
LinkField.prototype.set_disp=function(val){var t=null;if(val)t="<a href=\'javascript:loaddoc(\""+this.df.options+"\", \""+val+"\")\'>"+val+"</a>";this.set_disp_html(t);}
function IntField(){}IntField.prototype=new DataField();IntField.prototype.validate=function(v){if(isNaN(parseInt(v)))return null;return cint(v);};IntField.prototype.format_input=function(){if(this.input.value==null)this.input.value='';}
-function FloatField(){}FloatField.prototype=new DataField();FloatField.prototype.validate=function(v){var v=parseFloat(v);if(isNaN(v))return null;return v;};FloatField.prototype.format_input=function(){if(this.input.value==null)this.input.value='';}
+function FloatField(){}FloatField.prototype=new DataField();FloatField.prototype.validate=function(v){var v=parseFloat(v);if(isNaN(v))
+return null;return v;};FloatField.prototype.format_input=function(){if(this.input.value==null)this.input.value='';}
function CurrencyField(){}CurrencyField.prototype=new DataField();CurrencyField.prototype.format_input=function(){var v=fmt_money(this.input.value);if(this.not_in_form){if(!flt(this.input.value))v='';}
this.input.value=v;}
CurrencyField.prototype.validate=function(v){if(v==null||v=='')
@@ -575,7 +759,7 @@
var text_dialog;function make_text_dialog(){var d=new Dialog(520,410,'Edit Text');d.make_body([['Text','Enter Text'],['HTML','Description'],['Button','Update']]);d.widgets['Update'].onclick=function(){var t=this.dialog;t.field.set(t.widgets['Enter Text'].value);t.hide();}
d.onshow=function(){this.widgets['Enter Text'].style.height='300px';var v=_f.get_value(this.field.doctype,this.field.docname,this.field.df.fieldname);this.widgets['Enter Text'].value=v==null?'':v;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)
_f.cur_grid_cell.grid.cell_deselect();}
text_dialog=d;}
@@ -595,7 +779,7 @@
var v=this.options_list[0];else
var v=null;}
this.input.set_input(v);}
-this.input.set_input=function(v){if(!v){if(!me.input.multiple){if(me.docname){if(me.options_list&&me.options_list.length){me.set(me.options_list[0]);me.input.value=me.options_list[0];}else{me.input.value='';}}}}else{if(me.options_list){if(me.input.multiple){for(var i=0;i<me.input.options.length;i++){me.input.options[i].selected=0;if(me.input.options[i].value&&inList(v.split(","),me.input.options[i].value))
+this.input.set_input=function(v){if(!v){if(!me.input.multiple){if(me.docname){if(me.options_list&&me.options_list.length){me.set(me.options_list[0]);me.input.value=me.options_list[0];}else{me.input.value='';}}}}else{if(me.options_list){if(me.input.multiple){for(var i=0;i<me.input.options.length;i++){me.input.options[i].selected=0;if(me.input.options[i].value&&inList(typeof(v)=='string'?v.split(","):v,me.input.options[i].value))
me.input.options[i].selected=1;}}else if(in_list(me.options_list,v)){me.input.value=v;}}}}
this.get_value=function(){if(me.input.multiple){var l=[];for(var i=0;i<me.input.options.length;i++){if(me.input.options[i].selected)l[l.length]=me.input.options[i].value;}
return l;}else{if(me.input.options){var val=sel_val(me.input);if(!val&&!me.input.selectedIndex)
@@ -644,7 +828,7 @@
*/
wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
-f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-primary');this.first_button=true;}}}
+f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
errors.push(f.df.label+' is mandatory');if(v)ret[f.df.fieldname]=v;}
if(errors.length){msgprint('<b>Please check the following Errors</b>\n'+errors.join('\n'));return null;}
@@ -662,11 +846,20 @@
this.set_postion=function(){var d=get_screen_dims();this.wrapper.style.left=((d.w-cint(this.wrapper.style.width))/2)+'px';this.wrapper.style.top=(get_scroll_top()+60)+'px';top_index++;$y(this.wrapper,{zIndex:top_index});}
this.show=function(){if(this.display)return;this.set_postion()
$ds(this.wrapper);freeze();this.display=true;cur_dialog=this;if(this.onshow)this.onshow();}
-this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);if(cur_autosug)cur_autosug.clearSuggestions();this.display=false;cur_dialog=null;}
+this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
this.no_cancel=function(){$dh(this.cancel_img);}
if(opts)this.make();}
wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
/*
+ * lib/js/wn/ui/button.js
+ */
+wn.ui.Button=function(args){var me=this;$.extend(this,{make:function(){me.btn=wn.dom.add(args.parent,'button','btn btn-small '+(args.css_class||''));me.btn.args=args;me.loading_img=wn.dom.add(me.btn.args.parent,'img','',{margin:'0px 4px -2px 4px',display:'none'});me.loading_img.src='lib/images/ui/button-load.gif';if(args.is_ajax)wn.dom.css(me.btn,{marginRight:'24px'});me.btn.innerHTML=args.label;me.btn.user_onclick=args.onclick;$(me.btn).bind('click',function(){if(!this.disabled&&this.user_onclick)
+this.user_onclick(this);})
+me.btn.set_working=me.set_working;me.btn.done_working=me.done_working;if(me.btn.args.style)
+wn.dom.css(me.btn,args.style);},set_working:function(){me.btn.disabled='disabled';if(me.btn.args.is_ajax){$(me.btn).css('margin-right','0px');}
+$(me.loading_img).css('display','inline');},done_working:function(){me.btn.disabled=false;if(me.btn.args.is_ajax){$(me.btn).css('margin-right','24px');}
+$(me.loading_img).toggle(false);}});this.make();}
+/*
* lib/js/legacy/widgets/dialog.js
*/
var cur_dialog;var top_index=91;function Dialog(w,h,title,content){this.make({width:w,title:title});if(content)this.make_body(content);this.onshow='';this.oncancel='';this.no_cancel_flag=0;this.display=false;this.first_button=false;}
@@ -674,7 +867,7 @@
Dialog.prototype.make_body=function(content){this.rows={};this.widgets={};for(var i in content)this.make_row(content[i]);}
Dialog.prototype.clear_inputs=function(d){for(var wid in this.widgets){var w=this.widgets[wid];var tn=w.tagName?w.tagName.toLowerCase():'';if(tn=='input'||tn=='textarea'){w.value='';}else if(tn=='select'){sel_val(w.options[0].value);}else if(w.txt){w.txt.value='';}else if(w.input){w.input.value='';}}}
Dialog.prototype.make_row=function(d){var me=this;this.rows[d[1]]=$a(this.body,'div','dialog_row');var row=this.rows[d[1]];if(d[0]!='HTML'){var t=make_table(row,1,2,'100%',['30%','70%']);row.tab=t;var c1=$td(t,0,0);var c2=$td(t,0,1);if(d[0]!='Check'&&d[0]!='Button')
-$t(c1,d[1]);}
+$(c1).text(d[1]);}
if(d[0]=='HTML'){if(d[2])row.innerHTML=d[2];this.widgets[d[1]]=row;}
else if(d[0]=='Check'){var i=$a_input(c2,'checkbox','',{width:'20px'});c1.innerHTML=d[1];this.widgets[d[1]]=i;}
else if(d[0]=='Data'){c1.innerHTML=d[1];c2.style.overflow='auto';this.widgets[d[1]]=$a_input(c2,'text');if(d[2])$a(c2,'div','field_description').innerHTML=d[2];}
@@ -684,35 +877,102 @@
else if(d[0]=='Select'){c1.innerHTML=d[1];this.widgets[d[1]]=$a(c2,'select','',{width:'160px'})
if(d[2])$a(c2,'div','field_description').innerHTML=d[2];if(d[3])add_sel_options(this.widgets[d[1]],d[3],d[3][0]);}
else if(d[0]=='Text'){c1.innerHTML=d[1];c2.style.overflow='auto';this.widgets[d[1]]=$a(c2,'textarea');if(d[2])$a(c2,'div','field_description').innerHTML=d[2];}
-else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('btn-primary');this.first_button=true;}
+else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('btn-info');this.first_button=true;}
if(d[2]){b._onclick=d[2];}
this.widgets[d[1]]=b;}}
/*
* lib/js/wn/ui/listing.js
*/
-wn.widgets.Listing=function(opts){this.opts=opts;this.page_length=20;this.btns={};this.start=0;var me=this;this.make=function(opts){if(this.opts.parent.jquery)
-this.opts.parent=this.opts.parent.get(0);this.wrapper=$a(this.opts.parent,'div');this.filters_area=$a(this.wrapper,'div','listing-filters');this.toolbar_area=$a(this.wrapper,'div','listing-toolbar');this.results_area=$a(this.wrapper,'div','listing-results');this.more_button_area=$a(this.wrapper,'div','listing-more');this.no_results_area=$a(this.wrapper,'div','help_box',{display:'none'},(this.opts.no_result_message?this.opts.no_result_message:'No results'));if(opts)this.opts=opts;this.page_length=this.opts.page_length?this.opts.page_length:this.page_length;this.make_toolbar();this.make_filters();this.make_more_button();}
-this.make_filters=function(){if(this.opts.filters){$ds(this.filters_area);this.filters=new wn.widgets.FieldGroup(this.filters_area,this.opts.fields);}}
-this.make_toolbar=function(){if(!(this.opts.hide_refresh||this.opts.no_refresh)){if(this.opts.title){$a(this.toolbar_area,'h3','',{display:'inline-block',marginRight:'15px'},this.opts.title);}
-this.ref_img=$a(this.toolbar_area,'span','link_type',{color:'#888'},'[refresh]');this.ref_img.onclick=function(){me.run();}
-this.loading_img=$a(this.toolbar_area,'img','lib/images/ui/button-load.gif',{display:'none',marginLeft:'3px',marginBottom:'-2px'});}
-if(this.opts.new_doctype){this.new_btn=$btn(this.toolbar_area,'New '+get_doctype_label(this.opts.new_doctype),function(){newdoc(me.opts.new_doctype,me.opts.new_doc_onload,me.opts.new_doc_indialog,me.opts.new_doc_onsave);},{marginLeft:'7px'});}}
-this.make_more_button=function(){this.more_btn=$btn(this.more_button_area,'More...',function(){me.more_btn.set_working();me.run(function(){me.more_btn.done_working();},1);},'',0,1);$y(this.more_btn.loading_img,{marginBottom:'0px'});}
-this.clear=function(){this.results_area.innerHTML='';this.table=null;$ds(this.results_area);$dh(this.no_results_area);}
-this.make_results=function(r,rt){if(this.start==0)this.clear();$dh(this.more_button_area);if(this.loading_img)$dh(this.loading_img)
-if(r.message)r.values=r.message;if(r.values&&r.values.length){this.values=r.values;var m=Math.min(r.values.length,this.page_length);for(var i=0;i<m;i++){var row=this.add_row();this.opts.render_row(row,r.values[i],this,i);}
-this.start+=m;if(r.values.length>=this.page_length)$ds(this.more_button_area);}else{if(this.start==0){$dh(this.results_area);$ds(this.no_results_area);}}
-if(this.onrun)this.onrun();if(this.opts.onrun)this.opts.onrun();if(this.opts.callback)this.opts.callback(r);}
-this.add_row=function(){return $a(this.results_area,'div','',(opts.cell_style?opts.cell_style:{padding:'3px 0px'}));}
-this.run=function(callback,append){if(callback)
-this.onrun=callback;if(!append)
-this.start=0;if(!this.opts.method){this.query=this.opts.get_query?this.opts.get_query():this.opts.query;this.add_limits();var args={query_max:this.query_max||this.opts.query_max||'',as_dict:1}
+wn.provide('wn.ui');wn.ui.Listing=Class.extend({init:function(opts){this.opts=opts||{};this.page_length=20;this.start=0;this.data=[];if(opts){this.make();}},prepare_opts:function(){if(this.opts.new_doctype){if(wn.boot.profile.can_read.indexOf(this.opts.new_doctype)==-1){this.opts.new_doctype=null;}else{this.opts.new_doctype=get_doctype_label(this.opts.new_doctype);}}
+if(!this.opts.no_result_message){this.opts.no_result_message='Nothing to show'}},make:function(opts){if(opts){this.opts=opts;}
+this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
+ <div class="wnlist">\
+ <h3 class="title hide">%(title)s</h3>\
+ \
+ <div class="list-filters hide">\
+ <div class="show_filters well">\
+ <div>\
+ <button class="btn btn-small add-filter-btn">\
+ <i class="icon-plus"></i> Add Filter</button>\
+ </div>\
+ <div class="filter_area"></div>\
+ </div>\
+ </div>\
+ \
+ <div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
+ <div class="list-toolbar btn-group" style="display:inline-block; margin-right: 10px;">\
+ <a class="btn btn-small btn-refresh btn-info">\
+ <i class="icon-refresh icon-white"></i> Refresh</a>\
+ <a class="btn btn-small btn-new">\
+ <i class="icon-plus"></i> New</a>\
+ <a class="btn btn-small btn-filter">\
+ <i class="icon-search"></i> Filter</a>\
+ </div>\
+ <div style="display:inline-block; width: 24px; margin-left: 4px">\
+ <img src="lib/images/ui/button-load.gif" \
+ class="img-load"/></div>\
+ </div><div style="clear:both"></div>\
+ \
+ <div class="no-result help hide">\
+ %(no_result_message)s\
+ </div>\
+ \
+ <div class="result">\
+ <div class="result-list"></div>\
+ <div class="result-grid hide"></div>\
+ </div>\
+ \
+ <div class="paging-button">\
+ <button class="btn btn-small btn-more hide">More...</div>\
+ </div>\
+ </div>\
+ ',this.opts));this.$w=$(this.parent).find('.wnlist');this.set_events();if(this.show_filters){this.make_filters();}},add_button:function(html,onclick,before){$(html).click(onclick).insertBefore(this.$w.find('.list-toolbar '+before));this.btn_groupify();},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-refresh').click(function(){me.run();});this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
+if(this.new_doctype){this.$w.find('.btn-new').toggle(true).click(function(){newdoc(me.new_doctype);})}else{this.$w.find('.btn-new').remove();}
+if(!me.show_filters){this.$w.find('.btn-filter').remove();}
+if(this.hide_refresh||this.no_refresh){this.$w.find('.btn-refresh').remove();}
+this.btn_groupify();},btn_groupify:function(){var nbtns=this.$w.find('.list-toolbar a').length;if(nbtns==0){this.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
+this.onrun=a0;if(a0&&a0.callback)
+this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
+this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
-if(this.opts.args)
-$.extend(args,this.opts.args)
-if(this.loading_img)$di(this.loading_img);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:args,callback:function(r,rt){me.make_results(r,rt)},no_spinner:this.opts.no_loading,btn:this.opts.run_btn});}
-this.refresh=this.run;this.add_limits=function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}
-if(opts)this.make();}
+if(this.args)
+$.extend(args,this.args)
+if(this.get_args){$.extend(args,this.get_args());}
+return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
+if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
+this.start+=m;if(values.length>=this.page_length)
+this.$w.find('.btn-more').toggle(true);},add_row:function(){return this.$w.find('.result-list').append('<div class="list-row">').find('.list-row:last').get(0);},refresh:function(){this.run();},add_limits:function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}});wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.listobj.$w.find('.btn-filter').bind('click',function(){me.$w.find('.show_filters').slideToggle();if(!me.filters.length)
+me.add_filter();});this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').slideDown();}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
+values.push(f.get_value());})
+return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
+this.filters=fl;},get_filter:function(fieldname){for(var i in this.filters){if(this.filters[i].field.df.fieldname==fieldname)
+return this.filters[i];}}});wn.ui.Filter=Class.extend({init:function(opts){$.extend(this,opts);this.doctype=this.flist.doctype;this.fields_by_name={};this.make();this.make_options();this.set_events();},make:function(){this.flist.$w.find('.filter_area').append('<div class="list_filter">\
+ <select class="fieldname_select"></select>\
+ <select class="condition">\
+ <option value="=">Equals</option>\
+ <option value="like">Like</option>\
+ <option value=">=">Greater or equals</option>\
+ <option value=">=">Less or equals</option>\
+ <option value=">">Greater than</option>\
+ <option value="<">Less than</option>\
+ <option value="in">In</option>\
+ <option value="!=">Not equals</option>\
+ </select>\
+ <span class="filter_field"></span>\
+ <a class="close">×</a>\
+ </div>');this.$w=this.flist.$w.find('.list_filter:last-child');this.$select=this.$w.find('.fieldname_select');},make_options:function(){if(this.filter_fields){for(var i in this.filter_fields)
+this.add_field_option(this.filter_fields[i])}else{this.render_field_select();}},set_events:function(){var me=this;this.$w.find('.fieldname_select').bind('change',function(){me.set_field(this.value);});this.$w.find('a.close').bind('click',function(){me.$w.css('display','none');var value=me.field.get_value();me.field=null;if(!me.flist.get_filters().length){me.flist.$w.find('.set_filters').toggle(true);me.flist.$w.find('.show_filters').toggle(false);}
+if(value){me.flist.listobj.run();}
+me.flist.update_filters();return false;});me.$w.find('.condition').change(function(){if($(this).val()=='in'){me.set_field(me.field.df.fieldname,'Data');if(!me.field.desc_area)
+me.field.desc_area=$a(me.field.wrapper,'span','help',null,'values separated by comma');}else{me.set_field(me.field.df.fieldname);}});if(me.fieldname){this.set_values(me.fieldname,me.condition,me.value);}else{me.set_field('name');}},set_values:function(fieldname,condition,value){this.set_field(fieldname);if(condition)this.$w.find('.condition').val(condition).change();if(value)this.field.set_input(value)},render_field_select:function(){var me=this;me.table_fields=[];var std_filters=[{fieldname:'name',fieldtype:'Data',label:'ID',parent:me.doctype},{fieldname:'modified',fieldtype:'Date',label:'Last Modified',parent:me.doctype},{fieldname:'owner',fieldtype:'Data',label:'Created By',parent:me.doctype},{fieldname:'_user_tags',fieldtype:'Data',label:'Tags',parent:me.doctype}];$.each(std_filters.concat(fields_list[me.doctype]),function(i,df){me.add_field_option(df);});$.each(me.table_fields,function(i,table_df){if(table_df.options){$.each(fields_list[table_df.options],function(i,df){me.add_field_option(df);});}})},add_field_option:function(df){var me=this;if(me.doctype&&df.parent==me.doctype){var label=df.label;var table=get_label_doctype(me.doctype);if(df.fieldtype=='Table')me.table_fields.push(df);}else{var label=df.label+' ('+df.parent+')';var table=df.parent;}
+if(wn.model.no_value_type.indexOf(df.fieldtype)==-1&&!me.fields_by_name[df.fieldname]){this.$select.append($('<option>',{value:df.fieldname,table:table}).text(label));me.fields_by_name[df.fieldname]=df;}},set_field:function(fieldname,fieldtype){var me=this;var cur=me.field?{fieldname:me.field.df.fieldname,fieldtype:me.field.df.fieldtype}:{}
+var df=me.fields_by_name[fieldname];this.set_fieldtype(df,fieldtype);if(me.field&&cur.fieldname==fieldname&&df.fieldtype==cur.fieldtype){return;}
+me.$w.find('.fieldname_select').val(fieldname);var field_area=me.$w.find('.filter_field').empty().get(0);f=make_field(df,null,field_area,null,0,1);f.df.single_select=1;f.not_in_form=1;f.with_label=0;f.refresh();me.field=f;this.set_default_condition(df,fieldtype);$(me.field.wrapper).find(':input').keydown(function(ev){if(ev.which==13){me.flist.listobj.run();}})},set_fieldtype:function(df,fieldtype){if(df.original_type)
+df.fieldtype=df.original_type;else
+df.original_type=df.fieldtype;df.description='';df.reqd=0;if(fieldtype){df.fieldtype=fieldtype;return;}
+if(df.fieldtype=='Check'){df.fieldtype='Select';df.options='No\nYes';}else if(['Text','Text Editor','Code','Link'].indexOf(df.fieldtype)!=-1){df.fieldtype='Data';}},set_default_condition:function(df,fieldtype){if(!fieldtype){if(df.fieldtype=='Data'){this.$w.find('.condition').val('like');}else{this.$w.find('.condition').val('=');}}},get_value:function(){var me=this;var val=me.field.get_value();var cond=me.$w.find('.condition').val();if(me.field.df.original_type=='Check'){val=(val=='Yes'?1:0);}
+if(cond=='like'){val=val+'%';}
+return[me.$w.find('.fieldname_select option:selected').attr('table'),me.field.df.fieldname,me.$w.find('.condition').val(),cstr(val)];}});
/*
* lib/js/legacy/widgets/layout.js
*/
@@ -726,13 +986,13 @@
Layout.prototype.show=function(){$ds(this.wrapper);}
Layout.prototype.hide=function(){$dh(this.wrapper);}
Layout.prototype.close_borders=function(){if(this.with_border){this.myrows[this.myrows.length-1].wrapper.style.borderBottom='1px solid #000';}}
-function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
+function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div','form-layout-row');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
this.header=$a(this.main_body,'div','',{padding:(layout.with_border?'0px 8px':'0px')});this.body=$a(this.main_body,'div');this.table=$a(this.body,'table','',{width:'100%',borderCollapse:'collapse'});this.row=this.table.insertRow(0);this.mycells=[];}
LayoutRow.prototype.hide=function(){$dh(this.wrapper);}
LayoutRow.prototype.show=function(){$ds(this.wrapper);}
LayoutRow.prototype.addCell=function(wid){var lc=new LayoutCell(this.layout,this,wid);this.mycells[this.mycells.length]=lc;return lc;}
function LayoutCell(layout,layoutRow,width){if(width){var w=width+'';if(w.substr(w.length-2,2)!='px'){if(w.substr(w.length-1,1)!="%"){width=width+'%'};}}
-this.width=width;this.layout=layout;var cidx=layoutRow.row.cells.length;this.cell=layoutRow.row.insertCell(cidx);this.cell.style.verticalAlign='top';this.set_width(layoutRow.row,width);var h=$a(this.cell,'div','',{padding:(layout.with_border?'0px 8px':'0px')});this.wrapper=$a(this.cell,'div','',{padding:(layout.with_border?'8px':'8px 0px')});layout.cur_cell=this.wrapper;layout.cur_cell.header=h;}
+this.width=width;this.layout=layout;var cidx=layoutRow.row.cells.length;this.cell=layoutRow.row.insertCell(cidx);this.cell.style.verticalAlign='top';this.set_width(layoutRow.row,width);var h=$a(this.cell,'div','',{padding:(layout.with_border?'0px 8px':'0px')});this.wrapper=$a(this.cell,'div','',{padding:(layout.with_border?'8px':'0px')});layout.cur_cell=this.wrapper;layout.cur_cell.header=h;}
LayoutCell.prototype.set_width=function(row,width){var w=100;var n_cells=row.cells.length;var cells_with_no_width=n_cells;if(width){$y(row.cells[n_cells-1],{width:cint(width)+'%'})}else{row.cells[n_cells-1].estimated_width=1;}
for(var i=0;i<n_cells;i++){if(!row.cells[i].estimated_width){w=w-cint(row.cells[i].style.width);cells_with_no_width--;}}
for(var i=0;i<n_cells;i++){if(row.cells[i].estimated_width)
@@ -742,48 +1002,17 @@
/*
* lib/js/legacy/webpage/page_header.js
*/
-var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
+var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'1px solid #ddd'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #ddd'}}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
-this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
-PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'btn-primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
+this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){window.history.back();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
+PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;iconhtml=icon?('<i class="'+icon+'"></i> '):'';var $button=$('<button class="btn btn-small">'+iconhtml+label+'</button>').click(fn).appendTo(tb);if(green){$button.addClass('btn-info');$button.find('i').addClass('icon-white');}
+if(bold)$button.css('font-weight','bold');this.buttons[label]=$button.get(0);$ds(this.toolbar_area);return this.buttons[label];}
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
/*
- * lib/js/legacy/widgets/select.js
- */
-function SelectWidget(parent,options,width,editable,bg_color){var me=this;this.inp=$a(parent,'select');if(options)add_sel_options(this.inp,options);if(width)$y(this.inp,{width:width});this.set_width=function(w){$y(this.inp,{width:w})};this.set_options=function(o){add_sel_options(this.inp,o);}
-this.inp.onchange=function(){if(me.onchange)me.onchange(this);}
-return;}
-/*
- * lib/js/legacy/webpage/history.js
- */
-var nav_obj={}
-nav_obj.observers=[];nav_obj.add_observer=function(o){nav_obj.observers.push(o);}
-nav_obj.ol=[];nav_obj.open_notify=function(t,dt,dn,no_history){if(nav_obj.ol.length){var tmp=nav_obj.ol[nav_obj.ol.length-1];if(tmp&&tmp[0]==t&&tmp[1]==dt&&tmp[2]==dn)return;}
-if(!no_history){var tmp=[];for(var i in nav_obj.ol)
-if(!(nav_obj.ol[i][0]==t&&nav_obj.ol[i][1]==dt&&nav_obj.ol[i][2]==dn))tmp.push(nav_obj.ol[i]);nav_obj.ol=tmp;nav_obj.ol.push([t,dt,dn])
-en_t=encodeURIComponent(t);en_dt=encodeURIComponent(dt);en_dn=dn?encodeURIComponent(dn):'';if(en_t=='Page'){var id=en_dt+(dn?('/'+en_dn):'')}else{var id=en_t+'/'+en_dt+(dn?('/'+en_dn):'')}
-if(nav_obj.on_open)
-nav_obj.on_open(id);if(window.location.hash!='!'+id){window.location.hash='!'+id;}}
-nav_obj.notify_observers(t,dt,dn);if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}}
-nav_obj.notify_observers=function(t,dt,dn){for(var i=0;i<nav_obj.observers.length;i++){var o=nav_obj.observers[i];if(o&&o.notify)o.notify(t,dt,dn);}}
-nav_obj.rename_notify=function(dt,oldn,newn){for(var i=0;i<nav_obj.ol.length;i++){var o=nav_obj.ol[i];if(o[1]==dt&&o[2]==oldn)o[2]=newn;}}
-nav_obj.show_last_open=function(){var l=nav_obj.ol[nav_obj.ol.length-2];delete nav_obj.ol[nav_obj.ol.length-1];if(!l)loadpage('_home');else if(l[0]=='Page'){loadpage(l[1]);}else if(l[0]=='Report'){loadreport(l[1],l[2]);}else if(l[0]=='Form'){loaddoc(l[1],l[2]);}else if(l[0]=='DocBrowser'||l[0]=='List'){loaddocbrowser(l[1]);}}
-var _history_current;function history_get_name(t){var parts=[];if(t.length>=3){for(var i=2;i<t.length;i++){parts.push(t[i]);}}
-return parts.join('/')}
-nav_obj.get_page=function(loc){if(!loc)loc=window.location.hash;if(loc.substr(0,1)=='#'){loc=loc.substr(1);}
-if(loc.substr(0,1)=='!'){loc=loc.substr(1);}
-if(!in_list(['Page/','Form/','Repor','DocBr','List/'],loc.substr(0,5))){loc='Page/'+loc;}
-return loc.split('/');}
-function historyChange(newLocation){var t=nav_obj.get_page(newLocation)
-for(var i=0;i<t.length;i++)
-t[i]=decodeURIComponent(t[i]);if(nav_obj.ol.length){var c=nav_obj.ol[nav_obj.ol.length-1];if(t.length==2){if(c[0]==t[0]&&c[1]==t[1])return;}else{if(c[0]==t[0]&&c[1]==t[1]&&c[2]==t[2])return;}}
-if(t[2])
-var docname=history_get_name(t);if(t[0]=='Form'){_history_current=newLocation;if(docname.substr(0,3)=='New'&&!(locals[t[1]]&&locals[t[1]][docname])){newdoc(t[1]);}else{loaddoc(t[1],docname);}}else if(t[0]=='Report'){_history_current=newLocation;loadreport(t[1],docname);}else if(t[0]=='Page'){_history_current=newLocation;loadpage(t[1]);}else if(t[0]=='Application'){_history_current=newLocation;loadapp(t[1]);}else if(t[0]=='DocBrowser'||t[0]=='List'){_history_current=newLocation;loaddocbrowser(t[1]);}};$(window).bind('hashchange',function(){historyChange(location.hash);});
-/*
* lib/js/legacy/webpage/search.js
*/
-search_fields={};function setlinkvalue(name){selector.input.set_input(name);selector.hide();}
+search_fields={};function setlinkvalue(name){selector.input.set_input_value(name);selector.hide();}
function makeselector(){var d=new Dialog(540,440,'Search');d.make_body([['Data','Beginning With','Tip: You can use wildcard "%"'],['Select','Search By'],['Button','Search'],['HTML','Help'],['HTML','Result']]);var inp=d.widgets['Beginning With'];var field_sel=d.widgets['Search By'];var btn=d.widgets['Search'];d.sel_type='';d.values_len=0;d.set=function(input,type,label){d.sel_type=type;d.input=input;if(d.style!='Link'){d.rows['Result'].innerHTML='';d.values_len=0;}
d.style='Link';d.set_query_description()
if(!d.sel_type)d.sel_type='Value';d.set_title('Select a "'+d.sel_type+'" for field "'+label+'"');}
@@ -797,8 +1026,7 @@
try{inp.focus();}catch(e){}
if(d.input)d.input.set_get_query();var get_sf_list=function(dt){var l=[];var lf=search_fields[dt];for(var i=0;i<lf.length;i++)l.push(lf[i][1]);return l;}
$ds(d.rows['Search By']);if(search_fields[d.sel_type]){empty_select(field_sel);add_sel_options(field_sel,get_sf_list(d.sel_type),'ID');}else{empty_select(field_sel);add_sel_options(field_sel,['ID'],'ID');$c('webnotes.widgets.search.getsearchfields',{'doctype':d.sel_type},function(r,rt){search_fields[d.sel_type]=r.searchfields;empty_select(field_sel);add_sel_options(field_sel,get_sf_list(d.sel_type));field_sel.selectedIndex=0;});}}
-d.onhide=function(){if(d.input&&d.input.txt)
-d.input.txt.onchange()}
+d.onhide=function(){}
btn.onclick=function(){if(this.disabled)return;this.args.is_ajax=true;this.set_working();d.set_doctype=d.sel_type;var q='';args={};if(d.input&&d.input.get_query){var doc={};args.is_simple=1;if(cur_frm)doc=locals[cur_frm.doctype][cur_frm.docname];var q=d.input.get_query(doc,d.input.doctype,d.input.docname);if(!q){return'';}}
var get_sf_fieldname=function(v){var lf=search_fields[d.sel_type];if(!lf)
return'name'
@@ -816,92 +1044,58 @@
/*
* lib/js/legacy/webpage/spinner.js
*/
-function set_loading(){pending_req++;$('#spinner').css('visibility','visible');$('body').css('cursor','progress');}
+var pending_req=0;var fcount=0;var dialog_back;function set_loading(){pending_req++;$('#spinner').css('visibility','visible');$('body').css('cursor','progress');}
function hide_loading(){pending_req--;if(!pending_req){$('body').css('cursor','default');$('#spinner').css('visibility','hidden');}}
-/*
- * lib/js/legacy/webpage/freeze_page.js
- */
-var fcount=0;var frozen=0;var dialog_message;var dialog_back;function freeze(msg,do_freeze){if(!dialog_back){dialog_back=$a($i('body_div'),'div','dialog_back');$(dialog_back).css('opacity',0.6);}
-$ds(dialog_back);fcount++;frozen=1;}
-function unfreeze(){if(dialog_message)
-$dh(dialog_message);if(!fcount)return;fcount--;if(!fcount){$dh(dialog_back);frozen=0;}}
+function freeze(){if(!dialog_back){dialog_back=$a($i('body_div'),'div','dialog_back');$(dialog_back).css('opacity',0.6);}
+$ds(dialog_back);fcount++;}
+function unfreeze(){if(!fcount)return;fcount--;if(!fcount){$dh(dialog_back);}}
/*
* lib/js/legacy/webpage/error_console.js
*/
var err_console;var err_list=[];function errprint(t){if(!err_list)err_list=[];err_list.push('<pre style="font-family: Courier, Fixed; font-size: 11px; \
border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');}
-function setup_err_console(){err_console=new Dialog(640,480,'Error Console')
+$(document).bind('startup',function(){err_console=new Dialog(640,480,'Error Console')
err_console.make_body([['HTML','Error List'],['Button','Clear'],['HTML','Error Report']]);var span=$a(err_console.widgets['Error Report'],'span','link_type');span.innerHTML='Send Error Report';span.onclick=function(){msg=prompt('How / where did you get the error [optional]')
var call_back=function(r,rt){err_console.hide();msgprint("Error Report Sent")}
$c('webnotes.utils.send_error_report',{'err_msg':err_console.rows['Error List'].innerHTML,'msg':msg},call_back);}
err_console.widgets['Clear'].onclick=function(){err_list=[];err_console.rows['Error List'].innerHTML='';err_console.hide();}
err_console.onshow=function(){err_console.rows['Error List'].innerHTML='<div style="padding: 16px; height: 360px; width: 90%; overflow: auto;">'
-+err_list.join('<div style="height: 10px; margin-bottom: 10px; border-bottom: 1px solid #AAA"></div>')+'</div>';}}
-startup_list.push(setup_err_console);
++err_list.join('<div style="height: 10px; margin-bottom: 10px; border-bottom: 1px solid #AAA"></div>')+'</div>';}});
/*
* lib/js/legacy/webpage/loaders.js
*/
-function loadreport(dt,rep_name,onload,menuitem,reset_report){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);var show_report_builder=function(){if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();}
-_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload)
-onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
-rb.dt.run();}else{if(reset_report){rb.reset_report();}}
-if(!rb.forbidden){page_body.change_to('Report Builder');nav_obj.open_notify('Report',dt,rep_name);}});}
-show_report_builder();}
-var load_doc=loaddoc;function loaddoc(doctype,name,onload,menuitem,from_archive){doctype=get_label_doctype(doctype);if(frms['DocType']&&frms['DocType'].opendocs[doctype]){msgprint("Cannot open an instance of \""+doctype+"\" when the DocType is open.");return;}
-if(doctype=='DocType'&&frms[name]){msgprint("Cannot open DocType \""+name+"\" when its instance is open.");return;}
-var show_form=function(f){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();}
-if(!frms[doctype]){_f.add_frm(doctype,show_doc,name,from_archive);}else if(LocalDB.is_doc_loaded(doctype,name)){show_doc();}else{$c('webnotes.widgets.form.load.getdoc',{'name':name,'doctype':doctype,'user':user,'from_archive':(from_archive?1:0)},show_doc,null,null);}}
-var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog)
-nav_obj.open_notify('Form',doctype,name);if(onload)onload();}else{if(r.exc){msgprint('There were errors while loading '+doctype+' '+name);}
-loadpage('_home');}}
-show_form();}
-function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);if(!doctype){if(cur_frm)doctype=cur_frm.doctype;else return;}
-var show_doc=function(){frm=frms[doctype];if(frm.perm[0][CREATE]==1){if(frm.meta.issingle){var dn=doctype;LocalDB.set_default_values(locals[doctype][doctype]);}else
-var dn=LocalDB.create(doctype);if(onload)onload(dn);if(frm.in_dialog){var fd=_f.frm_dialog;fd.cdt=cdt;fd.cdn=cdn;fd.cnic=cnic;fd.on_save_callback=on_save_callback;}else{nav_obj.open_notify('Form',doctype,dn);}
-frm.refresh(dn);}else{msgprint('error:Not Allowed To Create '+doctype+'\nContact your Admin for help');}}
-var show_form=function(){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();}
-if(!frms[doctype])
-_f.add_frm(doctype,show_doc);else
-show_doc(frms[doctype]);}
-show_form();}
-var newdoc=new_doc;var pscript={};var cur_page;function loadpage(page_name,call_back,no_history){if(!page_name)return;if(page_name=='_home')
-page_name=home_page;var fn=function(r,rt){if(wn.pages[page_name]){var p=wn.pages[page_name]
-page_body.change_to(page_name);}else{var p=render_page(page_name);if(!p)return;}
-cur_page=page_name;if(call_back)call_back();scroll(0,0);pscript.update_page_history(page_name,no_history)
-try{if(pscript['refresh_'+page_name])pscript['refresh_'+page_name]();}catch(e){console.log(e);}}
-if(get_local('Page',page_name)||wn.pages[page_name])
-fn();else{args=get_url_dict();args.name=page_name;$c('webnotes.widgets.page.getpage',args,fn);}}
-pscript.update_page_history=function(page_name,no_history){var arg=null;var t=null;if(window.location.hash){var t=nav_obj.get_page(window.location.hash)}else if(get_url_arg('page')){var t=nav_obj.get_page(get_url_arg('page'))}
-if(t&&t[1]==page_name)arg=t[2];nav_obj.open_notify('Page',page_name,arg,no_history);}
-function loadscript(src,call_back){set_loading();var script=$a('head','script');script.type='text/javascript';script.src=src;script.onload=function(){if(call_back)call_back();hide_loading();}
-script.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){hide_loading();call_back();}}}
-var doc_browser_page;function loaddocbrowser(dt,label,fields){wn.require('lib/js/legacy/webpage/docbrowser.js');dt=get_label_doctype(dt);if(!doc_browser_page)
-doc_browser_page=new ItemBrowserPage();doc_browser_page.show(dt,label,fields);nav_obj.open_notify('List',dt,'');}
+function loadreport(dt,rep_name,onload){if(rep_name)
+wn.set_route('Report',dt,rep_name);else
+wn.set_route('Report',dt);}
+function loaddoc(doctype,name,onload){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){console.log(1)
+_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
+var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,'New '+doctype);}else{wn.set_route('Form',doctype,'New '+doctype);}})}
+var newdoc=new_doc;var pscript={};function loadpage(page_name,call_back,no_history){wn.set_route(page_name);}
+function loaddocbrowser(dt){wn.set_route('List',dt);}
/*
* lib/js/legacy/webpage/uploader.js
*/
var uploaders={};var upload_frame_count=0;Uploader=function(parent,args,callback){var id='frame'+upload_frame_count;upload_frame_count++;this.callback=callback;var div=$a(parent,'div');div.innerHTML='<iframe id="'+id+'" name="'+id+'" src="blank.html" \
- style="width:0px; height:0px; border:0px"></iframe>';var div=$a(parent,'div');div.innerHTML='<form method="POST" enctype="multipart/form-data" action="'+outUrl+'" target="'+id+'"></form>';var ul_form=div.childNodes[0];var f_list=[];var inp_fdata=$a_input($a(ul_form,'span'),'file',{name:'filedata'},{marginLeft:'7px'});if(!('cmd'in args)){var inp=$a_input($a(ul_form,'span'),'hidden',{name:'cmd'});inp.value='uploadfile';}
+ style="width:0px; height:0px; border:0px"></iframe>';var div=$a(parent,'div');div.innerHTML='<form method="POST" enctype="multipart/form-data" action="'+wn.request.url+'" target="'+id+'"></form>';var ul_form=div.childNodes[0];var f_list=[];var inp_fdata=$a_input($a(ul_form,'span'),'file',{name:'filedata'},{marginLeft:'7px'});if(!('cmd'in args)){var inp=$a_input($a(ul_form,'span'),'hidden',{name:'cmd'});inp.value='uploadfile';}
var inp=$a_input($a(ul_form,'span'),'hidden',{name:'uploader_id'});inp.value=id;var inp=$a_input($a(ul_form,'span'),'submit',null,{marginLeft:'7px'});inp.value='Upload';$y(inp,{width:'80px'});for(var key in args){var inp=$a_input($a(ul_form,'span'),'hidden',{name:key});inp.value=args[key];}
uploaders[id]=this;}
function upload_callback(id,fid){uploaders[id].callback(fid);}
/*
* lib/js/legacy/webpage/page.js
*/
-var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
+function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
pscript[event+'_'+this.name](me.wrapper);if(me.wrapper[event]){me.wrapper[event](me.wrapper);}}catch(e){console.log(e);}}
this.page_show=function(){set_title(me.doc.title?me.doc.title:me.name);if(!me.onload_complete){me.trigger('onload');me.onload_complete=true;}
me.trigger('onshow');cur_frm=null;}
-this.wrapper=page_body.add_page(page_name,this.page_show);this.cont=this.wrapper
+this.wrapper=wn.container.add_page(page_name,this.page_show);this.cont=this.wrapper
if(content)
this.wrapper.innerHTML=content;return this;}
function render_page(page_name,menuitem){if(!page_name)return;if((!locals['Page'])||(!locals['Page'][page_name])){loadpage('_home');return;}
var pdoc=locals['Page'][page_name];if(pdoc.style)set_style(pdoc.style)
-if(pdoc.stylesheet){set_style(locals.Stylesheet[pdoc.stylesheet].stylesheet);stylesheets.push(pdoc.stylesheet);}
var p=new Page(page_name,pdoc._Page__content?pdoc._Page__content:pdoc.content);var script=pdoc.__script?pdoc.__script:pdoc.script;p.doc=pdoc;if(script){eval(script);}
-page_body.change_to(page_name);return p;}
+wn.container.change_to(page_name);return p;}
function refresh_page(page_name){var fn=function(r,rt){render_page(page_name)}
-$c('webnotes.widgets.page.getpage',{'name':page_name,stylesheets:JSON.stringify(stylesheets)},fn);}
+$c('webnotes.widgets.page.getpage',{'name':page_name},fn);}
/*
* lib/js/legacy/wn/page_layout.js
*/
@@ -927,14 +1121,11 @@
d.name=LocalDB.get_localname(d.doctype);LocalDB.add(d.doctype,d.name);locals[d.doctype][d.name]=d;if(d.doctype=='DocType'){fields_list[d.name]=[];}else if(d.doctype=='DocField'){if(!d.parent){alert('Error: No parent specified for field "'+d.label+'"');}
if(!fields_list[d.parent])fields_list[d.parent]=[];fields_list[d.parent][fields_list[d.parent].length]=d;if(!fields[d.parent])
fields[d.parent]={};if(d.fieldname){fields[d.parent][d.fieldname]=d;}else if(d.label){fields[d.parent][d.label]=d;}}
-if(d.localname)
-notify_rename_observers(d.doctype,d.localname,d.name);}}
+if(d.localname){wn.model.new_names[d.localname]=d.name;$(document).trigger('rename',[d.doctype,d.localname,d.name]);delete locals[d.doctype][d.localname];}}}
local_name_idx={};LocalDB.get_localname=function(doctype){if(!local_name_idx[doctype])local_name_idx[doctype]=1;var n='New '+get_doctype_label(doctype)+' '+local_name_idx[doctype];local_name_idx[doctype]++;return n;}
LocalDB.set_default_values=function(doc){var doctype=doc.doctype;var docfields=fields_list[doctype];if(!docfields){return;}
var fields_to_refresh=[];for(var fid=0;fid<docfields.length;fid++){var f=docfields[fid];if(!in_list(no_value_fields,f.fieldtype)&&doc[f.fieldname]==null){var v=LocalDB.get_default_value(f.fieldname,f.fieldtype,f['default']);if(v){doc[f.fieldname]=v;fields_to_refresh.push(f.fieldname);}}}
return fields_to_refresh;}
-LocalDB.is_doc_loaded=function(dt,dn){var exists=false;if(locals[dt]&&locals[dt][dn])exists=true;if(exists&&dt=='DocType'&&!locals[dt][dn].__islocal&&!frms[dt])
-exists=false;return exists;}
function check_perm_match(p,dt,dn){if(!dn)return true;var out=false;if(p.match){if(user_defaults[p.match]){for(var i=0;i<user_defaults[p.match].length;i++){if(user_defaults[p.match][i]==locals[dt][dn][p.match]){return true;}}
return false;}else if(!locals[dt][dn][p.match]){return true;}else{return false;}}else{return true;}}
function get_perm(doctype,dn,ignore_submit){var perm=[[0,0],];if(in_list(user_roles,'Administrator'))perm[0][READ]=1;var plist=getchildren('DocPerm',doctype,'permissions','DocType');for(var pidx in plist){var p=plist[pidx];var pl=cint(p.permlevel?p.permlevel:0);if(in_list(user_roles,p.role)){if(check_perm_match(p,doctype,dn)){if(!perm[pl])perm[pl]=[];if(!perm[pl][READ]){if(cint(p.read))perm[pl][READ]=1;else perm[pl][READ]=0;}
@@ -963,9 +1154,6 @@
return locals[dt][newdoc];}
function make_doclist(dt,dn,deleted){var dl=[];dl[0]=locals[dt][dn];for(var ndt in locals){if(locals[ndt]){for(var ndn in locals[ndt]){var doc=locals[ndt][ndn];if(doc&&doc.parenttype==dt&&(doc.parent==dn||(deleted&&doc.__oldparent==dn))){dl[dl.length]=doc;}}}}
return dl;}
-var rename_observers=[];function notify_rename_observers(dt,old_name,new_name){try{delete locals[dt][old_name];}catch(e){alert("[rename_from_local] No Document for: "+old_name);}
-for(var i=0;i<rename_observers.length;i++){if(rename_observers[i])
-rename_observers[i].rename_notify(dt,old_name,new_name);}}
var Meta={};var local_dt={};Meta.make_local_dt=function(dt,dn){var dl=make_doclist('DocType',dt);if(!local_dt[dt])local_dt[dt]={};if(!local_dt[dt][dn])local_dt[dt][dn]={};for(var i=0;i<dl.length;i++){var d=dl[i];if(d.doctype=='DocField'){var key=d.fieldname?d.fieldname:d.label;local_dt[dt][dn][key]=copy_dict(d);}}}
Meta.get_field=function(dt,fn,dn){if(dn&&local_dt[dt]&&local_dt[dt][dn]){return local_dt[dt][dn][fn];}else{if(fields[dt])var d=fields[dt][fn];if(d)return d;}
return{};}
@@ -993,7 +1181,6 @@
return obj;}
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
all_clear=tmp;}}
-var f=frms[dt];if(f&&!all_clear){if(f)f.savingflag=false;return'Error';}
var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
@@ -1002,34 +1189,18 @@
if(errfld.length)msgprint('<b>Mandatory fields required in '+
(doc.parenttype?(fields[doc.parenttype][doc.parentfield].label+' (Table)'):get_doctype_label(doc.doctype))+':</b>\n'+errfld.join('\n'));return all_clear;}
/*
- * lib/js/legacy/webpage/body.js
- */
-wn.provide('wn.pages');function Body(){this.left_sidebar=null;this.right_sidebar=null;this.status_area=null;var me=this;page_body=this;this.ready=function(){$dh('startup_div');$ds('body_div');}
-this.setup_page_areas=function(){this.center=this.body;this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'}
-this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
-eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
-this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
-if(this.cp.page_width)
-$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
-this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
-c.page_show=onshow;if(onhide)
-c.page_hide=onhide;wn.pages[label]=c;$dh(c);return c;}
-this.change_to=function(label){$dh(this.center.loading);if(me.cur_page&&wn.pages[label]!=me.cur_page){if(me.cur_page.page_hide)
-me.cur_page.page_hide();$dh(me.cur_page);}
-me.cur_page=wn.pages[label];me.cur_page_label=label;$(me.cur_page).fadeIn();if(me.cur_page.page_show)
-me.cur_page.page_show(me.cur_page);}
-this.set_session_changed=function(){if(this.session_message_set)return;var div=$a($i('body_div').parentNode,'div','',{textAlign:'center',fontSize:'14px',margin:'150px auto'});$dh('body_div');div.innerHTML='This session has been changed. Please <span class="link_type" onclick="window.location.reload()">refresh</span> to continue';this.session_message_set=1;}
-this.setup();}
-/*
* lib/js/legacy/app.js
*/
-var popup_cont;var session={};var start_sid=null;if(!wn)var wn={};function startup(){start_sid=get_cookie('sid');popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
+var popup_cont;var session={};if(!wn)var wn={};function startup(){popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
if(r.dt_labels){for(key in r.dt_labels)session.rev_dt_labels[r.dt_labels[key]]=key;}
wn.control_panel=r.control_panel;}
-var setup_history=function(r){rename_observers.push(nav_obj);}
-var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();for(var i=0;i<startup_list.length;i++){startup_list[i]();}
-var t=to_open();if(t){historyChange(t);}else if(home_page){loadpage(home_page);}
-page_body.ready();}
+var setup_viewport=function(){wn.container=new wn.views.Container();if(user=='Guest')
+user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}
+$(document).trigger('startup');try{if(wn.control_panel.custom_startup_code)
+eval(wn.control_panel.custom_startup_code);}catch(e){errprint(e);}
+var t=to_open();if(t){window.location.hash=t;}else if(home_page){loadpage(home_page);}
+wn.route();$dh('startup_div');$ds('body_div');}
+var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_viewport();}
if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
console.log(wn.boot.error_messages)
if(wn.boot.server_messages)
@@ -1066,19 +1237,18 @@
var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'}
erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
if(inList(user_roles,'System Manager'))is_system_manager=1;}
-erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
-if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
-if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
-erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
- <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
+erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
+if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
+if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
+erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
else if(nm=='Accounts Browser')
pscript.make_chart(chart_type);}
loadpage(nm,call_back);}
-var update_messages=function(reset){if(inList(['Guest'],user)){return;}
-if(!reset){$c_page('home','event_updates','get_global_status_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
-show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
+var update_messages=function(reset){if(inList(['Guest'],user)||!wn.session_alive){return;}
+if(!reset){$c_page('home','event_updates','get_global_status_messages',null,function(r,rt){if(!r.exc){wn.container.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
+show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}});}else{wn.container.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
wn.updates.id=setInterval(update_messages,60000);}
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
@@ -1086,7 +1256,7 @@
/*
* erpnext/website/js/topbar.js
*/
-wn.provide('erpnext.navbar');erpnext.navbar.navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
+wn.provide('erpnext.navbar');erpnext.navbar.Navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
<div class="navbar-inner">\
<div class="container">\
<a class="brand">[brand]</a>\
@@ -1110,4 +1280,4 @@
<a href="https://erpnext.com">erpnext.com</a></div>\
</div>',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='footer_items'){item.route=item.url||item.custom_page;$('.web-footer-menu ul').append(repl('<li><a href="#!%(route)s" \
- data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})
\ No newline at end of file
+ data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.navbar.navbar=new erpnext.navbar.Navbar();})
\ No newline at end of file
diff --git a/version.num b/version.num
index fbee9e3..a8d5481 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-982
\ No newline at end of file
+1396
\ No newline at end of file