moved build.json to framework and updates to login page and update password
This commit is contained in:
parent
7bd4f79907
commit
9b439fffbc
13 changed files with 349 additions and 299 deletions
175
build.json
Normal file
175
build.json
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
[
|
||||
{
|
||||
"lib/js/core.min.js": [
|
||||
"lib/js/wn/class.js",
|
||||
"lib/js/wn/provide.js",
|
||||
"lib/js/wn/versions.js",
|
||||
"lib/js/wn/assets.js",
|
||||
"lib/js/wn/require.js",
|
||||
"lib/js/wn/dom.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"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"lib/js/wn/ui/toolbar.min.js": [
|
||||
"lib/js/wn/ui/toolbar/selector_dialog.js",
|
||||
"lib/js/wn/ui/toolbar/new.js",
|
||||
"lib/js/wn/ui/toolbar/search.js",
|
||||
"lib/js/wn/ui/toolbar/report.js",
|
||||
"lib/js/wn/ui/toolbar/recent.js",
|
||||
"lib/js/wn/ui/toolbar/toolbar.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"lib/js/legacy/report.compressed.js": [
|
||||
"lib/js/legacy/widgets/report_builder/report_builder.js",
|
||||
"lib/js/legacy/widgets/report_builder/datatable.js",
|
||||
"lib/js/legacy/widgets/report_builder/calculator.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"css/all-web.css": [
|
||||
"lib/css/bootstrap/headings.css",
|
||||
"lib/css/bootstrap/buttons.css",
|
||||
"lib/css/bootstrap/navbar.css",
|
||||
"lib/css/bootstrap/dropdown.css",
|
||||
"lib/css/bootstrap/tooltip.css",
|
||||
"lib/css/legacy/body.css",
|
||||
"lib/css/legacy/messages.css",
|
||||
"lib/css/legacy/dialog.css",
|
||||
"lib/css/ui/common.css",
|
||||
"lib/css/ui/fonts.css",
|
||||
"lib/css/ui/list.css",
|
||||
"lib/css/ui/views.css"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"css/all-app.css": [
|
||||
"lib/css/bootstrap/headings.css",
|
||||
"lib/css/bootstrap/buttons.css",
|
||||
"lib/css/bootstrap/navbar.css",
|
||||
"lib/css/bootstrap/dropdown.css",
|
||||
"lib/css/bootstrap/tooltip.css",
|
||||
"lib/css/bootstrap/label.css",
|
||||
"lib/css/bootstrap/icons.css",
|
||||
"lib/css/bootstrap/popover.css",
|
||||
"lib/css/legacy/body.css",
|
||||
"lib/css/legacy/messages.css",
|
||||
"lib/css/legacy/forms.css",
|
||||
"lib/css/legacy/fields.css",
|
||||
"lib/css/legacy/grid.css",
|
||||
"lib/css/legacy/listing.css",
|
||||
"lib/css/legacy/report.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/common.css",
|
||||
"lib/css/ui/list.css",
|
||||
"lib/css/ui/views.css",
|
||||
"lib/css/ui/fonts.css",
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"js/all-web.js": [
|
||||
"lib/js/lib/history/history.min.js:concat",
|
||||
"lib/js/lib/bootstrap.min.js:concat",
|
||||
"lib/js/core.min.js:concat",
|
||||
"lib/js/legacy/globals.js",
|
||||
"lib/js/legacy/utils/datatype.js",
|
||||
"lib/js/legacy/utils/datetime.js",
|
||||
"lib/js/legacy/utils/dom.js",
|
||||
"lib/js/legacy/utils/handler.js",
|
||||
"lib/js/legacy/utils/msgprint.js",
|
||||
"lib/js/wn/ui/appframe.js",
|
||||
"lib/js/wn/ui/dialog.js",
|
||||
"lib/js/legacy/widgets/dialog.js",
|
||||
"lib/js/wn/ui/listing.js",
|
||||
"lib/js/legacy/webpage/page_header.js",
|
||||
"lib/js/legacy/webpage/spinner.js",
|
||||
"lib/js/legacy/webpage/loaders.js",
|
||||
"lib/js/legacy/wn/widgets/footer.js",
|
||||
"lib/js/legacy/model/local_data.js",
|
||||
"lib/js/legacy/model/doclist.js",
|
||||
"lib/js/wn/app.js",
|
||||
"js/app.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"js/all-app.js": [
|
||||
"lib/js/lib/history/history.min.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",
|
||||
"lib/js/legacy/globals.js",
|
||||
"lib/js/legacy/utils/datatype.js",
|
||||
"lib/js/legacy/utils/datetime.js",
|
||||
"lib/js/legacy/utils/dom.js",
|
||||
"lib/js/legacy/utils/handler.js",
|
||||
"lib/js/legacy/utils/msgprint.js",
|
||||
"lib/js/legacy/utils/printElement.js",
|
||||
"lib/js/legacy/widgets/form/fields.js",
|
||||
"lib/js/wn/ui/appframe.js",
|
||||
"lib/js/wn/ui/dialog.js",
|
||||
"lib/js/wn/ui/button.js",
|
||||
"lib/js/legacy/widgets/dialog.js",
|
||||
"lib/js/legacy/widgets/layout.js",
|
||||
"lib/js/legacy/widgets/tabbedpage.js",
|
||||
"lib/js/legacy/webpage/page_header.js",
|
||||
"lib/js/legacy/widgets/tags.js",
|
||||
"lib/js/legacy/widgets/export_query.js",
|
||||
"lib/js/legacy/webpage/search.js",
|
||||
"lib/js/legacy/webpage/spinner.js",
|
||||
"lib/js/legacy/webpage/error_console.js",
|
||||
"lib/js/legacy/webpage/loaders.js",
|
||||
"lib/js/legacy/webpage/uploader.js",
|
||||
"lib/js/legacy/wn/page_layout.js",
|
||||
"lib/js/legacy/wn/widgets/page_sidebar.js",
|
||||
"lib/js/legacy/wn/widgets/footer.js",
|
||||
"lib/js/legacy/model/local_data.js",
|
||||
"lib/js/legacy/model/doclist.js",
|
||||
"lib/js/wn/ui/toolbar.min.js:concat",
|
||||
"lib/js/wn/views/breadcrumbs.js",
|
||||
"lib/js/legacy/widgets/form/fields.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",
|
||||
"lib/js/legacy/widgets/form/grid.js",
|
||||
"lib/js/legacy/widgets/form/form_grid.js",
|
||||
"lib/js/legacy/widgets/form/print_format.js",
|
||||
"lib/js/legacy/widgets/form/email.js",
|
||||
"lib/js/legacy/widgets/form/clientscriptAPI.js",
|
||||
"lib/js/legacy/widgets/form/form_comments.js",
|
||||
"lib/js/legacy/wn/widgets/form/sidebar.js",
|
||||
"lib/js/legacy/wn/widgets/form/comments.js",
|
||||
"lib/js/legacy/wn/widgets/form/attachments.js",
|
||||
"lib/js/legacy/wn/widgets/form/assign_to.js",
|
||||
"lib/js/wn/app.js",
|
||||
"js/app.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
182
conf/build.json
182
conf/build.json
|
|
@ -1,172 +1,10 @@
|
|||
[
|
||||
{
|
||||
"lib/js/core.min.js": [
|
||||
"lib/js/wn/class.js",
|
||||
"lib/js/wn/provide.js",
|
||||
"lib/js/wn/versions.js",
|
||||
"lib/js/wn/assets.js",
|
||||
"lib/js/wn/require.js",
|
||||
"lib/js/wn/dom.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"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"lib/js/wn/ui/toolbar.min.js": [
|
||||
"lib/js/wn/ui/toolbar/selector_dialog.js",
|
||||
"lib/js/wn/ui/toolbar/new.js",
|
||||
"lib/js/wn/ui/toolbar/search.js",
|
||||
"lib/js/wn/ui/toolbar/report.js",
|
||||
"lib/js/wn/ui/toolbar/recent.js",
|
||||
"lib/js/wn/ui/toolbar/toolbar.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"lib/js/legacy/report.compressed.js": [
|
||||
"lib/js/legacy/widgets/report_builder/report_builder.js",
|
||||
"lib/js/legacy/widgets/report_builder/datatable.js",
|
||||
"lib/js/legacy/widgets/report_builder/calculator.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"css/all-web.css": [
|
||||
"lib/css/legacy/body.css",
|
||||
"lib/css/legacy/messages.css",
|
||||
"lib/css/legacy/dialog.css",
|
||||
"lib/css/bootstrap/headings.css",
|
||||
"lib/css/bootstrap/buttons.css",
|
||||
"lib/css/bootstrap/navbar.css",
|
||||
"lib/css/bootstrap/dropdown.css",
|
||||
"lib/css/bootstrap/tooltip.css",
|
||||
"lib/css/ui/fonts.css",
|
||||
"lib/css/ui/list.css"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"css/all-app.css": [
|
||||
"lib/css/legacy/body.css",
|
||||
"lib/css/legacy/messages.css",
|
||||
"lib/css/legacy/forms.css",
|
||||
"lib/css/legacy/grid.css",
|
||||
"lib/css/legacy/listing.css",
|
||||
"lib/css/legacy/report.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/views.css",
|
||||
"lib/css/ui/fonts.css",
|
||||
"lib/css/bootstrap/headings.css",
|
||||
"lib/css/bootstrap/buttons.css",
|
||||
"lib/css/bootstrap/navbar.css",
|
||||
"lib/css/bootstrap/dropdown.css",
|
||||
"lib/css/bootstrap/tooltip.css",
|
||||
"lib/css/bootstrap/label.css",
|
||||
"lib/css/bootstrap/icons.css",
|
||||
"lib/css/bootstrap/popover.css",
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"js/all-web.js": [
|
||||
"lib/js/lib/history/history.min.js:concat",
|
||||
"lib/js/lib/bootstrap.min.js:concat",
|
||||
"lib/js/core.min.js:concat",
|
||||
"lib/js/legacy/globals.js",
|
||||
"lib/js/legacy/utils/datatype.js",
|
||||
"lib/js/legacy/utils/datetime.js",
|
||||
"lib/js/legacy/utils/dom.js",
|
||||
"lib/js/legacy/utils/handler.js",
|
||||
"lib/js/legacy/utils/msgprint.js",
|
||||
"lib/js/wn/ui/appframe.js",
|
||||
"lib/js/wn/ui/dialog.js",
|
||||
"lib/js/legacy/widgets/dialog.js",
|
||||
"lib/js/wn/ui/listing.js",
|
||||
"lib/js/legacy/webpage/page_header.js",
|
||||
"lib/js/legacy/webpage/spinner.js",
|
||||
"lib/js/legacy/webpage/loaders.js",
|
||||
"lib/js/legacy/wn/widgets/footer.js",
|
||||
"lib/js/legacy/model/local_data.js",
|
||||
"lib/js/legacy/model/doclist.js",
|
||||
"lib/js/legacy/app.js",
|
||||
"js/app.js"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"js/all-app.js": [
|
||||
"lib/js/lib/history/history.min.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",
|
||||
"lib/js/legacy/globals.js",
|
||||
"lib/js/legacy/utils/datatype.js",
|
||||
"lib/js/legacy/utils/datetime.js",
|
||||
"lib/js/legacy/utils/dom.js",
|
||||
"lib/js/legacy/utils/handler.js",
|
||||
"lib/js/legacy/utils/msgprint.js",
|
||||
"lib/js/legacy/utils/printElement.js",
|
||||
"lib/js/legacy/widgets/form/fields.js",
|
||||
"lib/js/wn/ui/appframe.js",
|
||||
"lib/js/wn/ui/dialog.js",
|
||||
"lib/js/wn/ui/button.js",
|
||||
"lib/js/legacy/widgets/dialog.js",
|
||||
"lib/js/legacy/widgets/layout.js",
|
||||
"lib/js/legacy/widgets/tabbedpage.js",
|
||||
"lib/js/legacy/webpage/page_header.js",
|
||||
"lib/js/legacy/widgets/tags.js",
|
||||
"lib/js/legacy/widgets/export_query.js",
|
||||
"lib/js/legacy/webpage/search.js",
|
||||
"lib/js/legacy/webpage/spinner.js",
|
||||
"lib/js/legacy/webpage/error_console.js",
|
||||
"lib/js/legacy/webpage/loaders.js",
|
||||
"lib/js/legacy/webpage/uploader.js",
|
||||
"lib/js/legacy/wn/page_layout.js",
|
||||
"lib/js/legacy/wn/widgets/page_sidebar.js",
|
||||
"lib/js/legacy/wn/widgets/footer.js",
|
||||
"lib/js/legacy/model/local_data.js",
|
||||
"lib/js/legacy/model/doclist.js",
|
||||
"lib/js/wn/ui/toolbar.min.js:concat",
|
||||
"lib/js/wn/views/breadcrumbs.js",
|
||||
"lib/js/legacy/widgets/form/fields.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",
|
||||
"lib/js/legacy/widgets/form/grid.js",
|
||||
"lib/js/legacy/widgets/form/form_grid.js",
|
||||
"lib/js/legacy/widgets/form/print_format.js",
|
||||
"lib/js/legacy/widgets/form/email.js",
|
||||
"lib/js/legacy/widgets/form/clientscriptAPI.js",
|
||||
"lib/js/legacy/widgets/form/form_comments.js",
|
||||
"lib/js/legacy/wn/widgets/form/sidebar.js",
|
||||
"lib/js/legacy/wn/widgets/form/comments.js",
|
||||
"lib/js/legacy/wn/widgets/form/attachments.js",
|
||||
"lib/js/legacy/wn/widgets/form/assign_to.js",
|
||||
"lib/js/legacy/app.js",
|
||||
"js/app.js"
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
{
|
||||
"css/all-web.css": [
|
||||
],
|
||||
"css/all-app.css": [
|
||||
],
|
||||
"js/all-web.js": [
|
||||
],
|
||||
"js/all-app.js": [
|
||||
]
|
||||
}
|
||||
|
|
@ -225,6 +225,10 @@ div.std-footer-item {
|
|||
padding: 0px;
|
||||
}
|
||||
|
||||
.layout-section {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.layout-main-section {
|
||||
width: 71%;
|
||||
float: left;
|
||||
|
|
|
|||
65
css/legacy/fields.css
Normal file
65
css/legacy/fields.css
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/* Documents */
|
||||
|
||||
.frm_field_table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.datalabelcell {
|
||||
padding: 2px 0px;
|
||||
width: 160px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.datainputcell { padding: 2px 0px; }
|
||||
|
||||
|
||||
.help ol {
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
.field_description_top {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
|
@ -136,72 +136,6 @@ div.time_field select{
|
|||
width: 45px;
|
||||
}
|
||||
|
||||
/* Documents */
|
||||
|
||||
.frm_field_table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.datalabelcell {
|
||||
padding: 2px 0px;
|
||||
width: 160px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.datainputcell { padding: 2px 0px; }
|
||||
|
||||
|
||||
.help ol {
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
.field_description_top {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.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 {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ div.appframe-titlebar {
|
|||
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
|
||||
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom: 1px solid #aaa;
|
||||
min-height: 1.2em;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ wn.ui.AppFrame = Class.extend({
|
|||
})
|
||||
|
||||
},
|
||||
title: function(txt) {
|
||||
this.$titlebar.find('.appframe-title').text(txt);
|
||||
},
|
||||
add_button: function(label, click, icon) {
|
||||
if(!this.$w.find('.appframe-toolbar').length)
|
||||
this.$w.append('<div class="appframe-toolbar"></div>');
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@
|
|||
wn.widgets.FieldGroup = function() {
|
||||
this.first_button = false;
|
||||
this.make_fields = function(body, fl) {
|
||||
if(!window.make_field) {
|
||||
// called in website, load some libs
|
||||
wn.require('lib/css/legacy/fields.css');
|
||||
wn.require('lib/js/legacy/widgets/form/fields.js');
|
||||
wn.require('lib/js/wn/ui/button.js');
|
||||
}
|
||||
|
||||
$y(this.body, {padding:'11px'});
|
||||
this.fields_dict = {}; // reset
|
||||
for(var i=0; i<fl.length; i++) {
|
||||
|
|
@ -185,6 +192,9 @@ wn.widgets.Dialog = function(opts) {
|
|||
|
||||
wn.widgets.Dialog.prototype = new wn.widgets.FieldGroup();
|
||||
|
||||
wn.provide('wn.ui');
|
||||
wn.ui.Dialog = wn.widgets.Dialog
|
||||
|
||||
// close open dialogs on ESC
|
||||
$(document).bind('keydown', function(e) {
|
||||
if(cur_dialog && !cur_dialog.no_cancel_flag && e.which==27) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class Bundle:
|
|||
|
||||
print "Wrote %s - %sk" % (outfile, str(int(os.path.getsize(outfile)/1024)))
|
||||
|
||||
def make(self, bpath):
|
||||
def make(self):
|
||||
"""
|
||||
Build (stitch + compress) the file defined in build.json
|
||||
"""
|
||||
|
|
@ -84,17 +84,33 @@ class Bundle:
|
|||
|
||||
# open the build.json file and read
|
||||
# the dict
|
||||
print "making %s ..." % bpath
|
||||
with open(bpath, 'r') as bfile:
|
||||
|
||||
print "Building js and css files..."
|
||||
|
||||
# framework js and css files
|
||||
with open('lib/build.json', 'r') as bfile:
|
||||
bdata = eval(bfile.read())
|
||||
|
||||
path = os.path.dirname(bpath)
|
||||
# app js and css files
|
||||
if os.path.exists('build.json'):
|
||||
with open('build.json', 'r') as bfile:
|
||||
appfiles = eval(bfile.read())
|
||||
else:
|
||||
appfiles = {}
|
||||
|
||||
path = '.'
|
||||
|
||||
for buildfile in bdata:
|
||||
# build the file list relative to the main folder
|
||||
outfile = buildfile.keys()[0]
|
||||
infiles = buildfile[outfile]
|
||||
|
||||
# add app js and css to the list
|
||||
if outfile in appfiles:
|
||||
for f in appfiles[outfile]:
|
||||
if f not in infiles:
|
||||
infiles.append(f)
|
||||
|
||||
fl = [os.path.relpath(os.path.join(path, f), os.curdir) for f in infiles]
|
||||
|
||||
# js files are minified by default unless explicitly
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ def build():
|
|||
"""concat / minify js files"""
|
||||
from py.build.bundle import Bundle
|
||||
bundle = Bundle()
|
||||
bundle.make('build.json')
|
||||
bundle.make()
|
||||
update_version()
|
||||
|
||||
def get_version():
|
||||
|
|
|
|||
|
|
@ -1,31 +1,33 @@
|
|||
<div class="layout_wrapper" id='login_wrapper'>
|
||||
<h1 style="margin-left: 8px; margin-bottom: 24px;">Login</h1>
|
||||
<table border="0" cellspacing="8">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Login Id</td>
|
||||
<td><input id="login_id" type="text" style="width: 180px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td><input id="password" type="password" style="width: 180px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"><input id="remember_me" type="checkbox" /></td>
|
||||
<td>Remember Me</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td id="login_message"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button id="login_btn" class="btn btn-small btn-primary">Login</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="margin-left: 8px;"><span class="link_type"
|
||||
onclick="pscript.show_forgot_password()">Forgot Password</span></p>
|
||||
<div class="layout-wrapper layout-wrapper-appframe" id='login_wrapper'>
|
||||
<div class="appframe-area"></div>
|
||||
<div class="layout-section">
|
||||
<table border="0" cellspacing="8">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Login Id</td>
|
||||
<td><input id="login_id" type="text" style="width: 180px"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td><input id="password" type="password" style="width: 180px" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right"><input id="remember_me" type="checkbox" /></td>
|
||||
<td>Remember Me</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td id="login_message"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button id="login_btn" class="btn btn-small btn-primary">Login</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="margin-left: 72px;"><span class="link_type"
|
||||
onclick="wn.show_forgot_password()">Forgot Password</span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -20,7 +20,10 @@
|
|||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
pscript['onload_Login Page'] = function(){
|
||||
pscript['onload_Login Page'] = function(wrapper){
|
||||
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
|
||||
wrapper.appframe.title('Login');
|
||||
|
||||
var lw = $i('login_wrapper');
|
||||
$bs(lw, '1px 1px 3px #888');
|
||||
|
||||
|
|
@ -63,18 +66,26 @@ pscript.doLogin = function(){
|
|||
}
|
||||
|
||||
|
||||
pscript.show_forgot_password = function(){
|
||||
wn.show_forgot_password = function(){
|
||||
// create dialog
|
||||
var d = new Dialog(400, 400, 'Reset Password')
|
||||
d.make_body([['HTML','Title','Enter your email id to reset the password'], ['Data','Email Id'], ['Button','Reset']]);
|
||||
var d = new wn.ui.Dialog({
|
||||
title:"Forgot Password",
|
||||
fields: [
|
||||
{'label':'Email Id', 'fieldname':'email_id', 'fieldtype':'Data', 'reqd':true},
|
||||
{'label':'Email Me A New Password', 'fieldname':'run', 'fieldtype':'Button'}
|
||||
]
|
||||
});
|
||||
|
||||
var callback = function(r,rt) {
|
||||
if(!r.exc) pscript.forgot_dialog.hide();
|
||||
}
|
||||
|
||||
d.widgets['Reset'].onclick = function() {
|
||||
$c('reset_password', {user: pscript.forgot_dialog.widgets['Email Id'].value}, callback)
|
||||
}
|
||||
d.show();
|
||||
pscript.forgot_dialog = d;
|
||||
$(d.fields_dict.run.input).click(function() {
|
||||
var values = d.get_values();
|
||||
if(!values) return;
|
||||
wn.call({
|
||||
method:'reset_password',
|
||||
args: { user: values.email_id },
|
||||
callback: function() {
|
||||
d.hide();
|
||||
}
|
||||
})
|
||||
})
|
||||
d.show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,19 +198,11 @@ def reset_password():
|
|||
import profile
|
||||
user_profile = profile.Profile(user)
|
||||
pwd = user_profile.reset_password()
|
||||
try:
|
||||
from server_tools.gateway_utils import change_password
|
||||
res = change_password(None, pwd, user=user)
|
||||
except ImportError, e:
|
||||
res = 'No Gateway'
|
||||
if res and res.get('message')=='Password Updated' or res=='No Gateway':
|
||||
user_profile.send_new_pwd(pwd)
|
||||
webnotes.msgprint("Password has been reset and sent to your email id.")
|
||||
else:
|
||||
webnotes.msgprint('Unable to reset password. Please contact support@erpnext.com')
|
||||
webnotes.msgprint(res)
|
||||
user_profile.send_new_pwd(pwd)
|
||||
|
||||
webnotes.msgprint("Password has been reset and sent to your email id.")
|
||||
else:
|
||||
webnotes.msgprint("No such user (%s)", user)
|
||||
webnotes.msgprint("No such user (%s)" % user)
|
||||
|
||||
|
||||
def handle():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue