mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-10 23:17:08 -04:00
Replace notifications with bootstrap-notify (#478)
Add bstables responsive addon (#558) Improve bulk update refresh (#432, #604) Fix bulk tax update if default tax is configured in general_config Reuse commons js parts in form validation code
This commit is contained in:
@@ -194,39 +194,16 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
|
||||
jqu
|
||||
<script type='text/javascript'>
|
||||
//validation and submit handling
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#barcode_config_form').validate({
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
$('#barcode_config_form').validate($.extend(form_support.handler, {
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#barcode_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
errorLabelContainer: "#barcode_error_message_box",
|
||||
|
||||
rules:
|
||||
rules:
|
||||
{
|
||||
barcode_width:
|
||||
{
|
||||
@@ -303,6 +280,6 @@ $(document).ready(function()
|
||||
number:"<?php echo $this->lang->line('config_default_barcode_page_cellspacing_number'); ?>"
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -231,32 +231,9 @@ $(document).ready(function()
|
||||
window.location='<?php echo site_url('config/backup_db') ?>';
|
||||
});
|
||||
|
||||
$('#general_config_form').validate({
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
$('#general_config_form').validate($.extend(form_support.handler, {
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#general_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
{
|
||||
@@ -301,6 +278,6 @@ $(document).ready(function()
|
||||
number: "<?php echo $this->lang->line('config_lines_per_page_number'); ?>"
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -140,34 +140,11 @@ $(document).ready(function()
|
||||
})
|
||||
});
|
||||
|
||||
$('#info_config_form').validate({
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
$('#info_config_form').validate($.extend(form_support.handler, {
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#general_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
rules:
|
||||
{
|
||||
company: "required",
|
||||
address: "required",
|
||||
@@ -184,6 +161,6 @@ $(document).ready(function()
|
||||
email: "<?php echo $this->lang->line('common_email_invalid_format'); ?>",
|
||||
return_policy: "<?php echo $this->lang->line('config_return_policy_required'); ?>"
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -97,7 +97,7 @@ $(document).ready(function()
|
||||
})();
|
||||
$("#use_invoice_template").change(enable_disable_use_invoice_template);
|
||||
|
||||
$('#invoice_config_form').validate({
|
||||
$('#invoice_config_form').validate($.extend(form_support.handler, {
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
beforeSerialize: function(arr, $form, options) {
|
||||
@@ -105,14 +105,7 @@ $(document).ready(function()
|
||||
return true;
|
||||
},
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
$.notify(response.message, { type: response.sucecss } );
|
||||
// set back disabled state
|
||||
enable_disable_invoice_enable();
|
||||
enable_disable_use_invoice_template();
|
||||
@@ -121,25 +114,8 @@ $(document).ready(function()
|
||||
});
|
||||
},
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#receipt_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
errorLabelContainer: "#receipt_error_message_box"
|
||||
|
||||
rules:
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
messages:
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -267,43 +267,8 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("span").tooltip();
|
||||
|
||||
$('#locale_config_form').validate({
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#locale_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
messages:
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
$('#locale_config_form').validate($.extend(form_support.handler, {
|
||||
errorLabelContainer: "#locale_error_message_box"
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -71,32 +71,9 @@
|
||||
//validation and submit handling
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#message_config_form').validate({
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
$('#message_config_form').validate($.extend(form_support.base, {
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#general_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
{
|
||||
@@ -111,6 +88,6 @@ $(document).ready(function()
|
||||
msg_pwd: "<?php echo $this->lang->line('config_msg_pwd_required'); ?>",
|
||||
msg_src: "<?php echo $this->lang->line('config_msg_src_required'); ?>"
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -211,38 +211,22 @@ $(document).ready(function()
|
||||
|
||||
var dialog_confirmed = window.jsPrintSetup;
|
||||
|
||||
$('#receipt_config_form').validate({
|
||||
$('#receipt_config_form').validate($.extend(form_support.handler, {
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
beforeSerialize: function(arr, $form, options) {
|
||||
return ( dialog_confirmed || confirm('<?php echo $this->lang->line('config_jsprintsetup_required'); ?>') );
|
||||
},
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
$.notify(response.message, { type: response.success} );
|
||||
},
|
||||
dataType:'json'
|
||||
});
|
||||
},
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#receipt_error_message_box",
|
||||
wrapper: "li",
|
||||
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
rules:
|
||||
{
|
||||
print_top_margin:
|
||||
{
|
||||
@@ -289,6 +273,6 @@ $(document).ready(function()
|
||||
number:"<?php echo $this->lang->line('config_print_right_margin_number'); ?>"
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -71,36 +71,20 @@ $(document).ready(function()
|
||||
return value.indexOf('_') === -1;
|
||||
}, "<?php echo $this->lang->line('config_stock_location_invalid_chars'); ?>");
|
||||
|
||||
$('#location_config_form').validate({
|
||||
$('#location_config_form').validate($.extend(form_support.handler, {
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response) {
|
||||
if(response.success)
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
}
|
||||
|
||||
$.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'});
|
||||
$("#stock_locations").load('<?php echo site_url("config/stock_locations"); ?>', init_add_remove_locations);
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#stock_error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
|
||||
rules:
|
||||
rules:
|
||||
{
|
||||
<?php
|
||||
$i = 0;
|
||||
@@ -132,6 +116,6 @@ $(document).ready(function()
|
||||
}
|
||||
?>
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -57,7 +57,7 @@ $(document).ready(function()
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="title_bar" class="btn-toolbar">
|
||||
<div id="title_bar" class="btn-toolbar print_hide">
|
||||
<button class='btn btn-info btn-sm pull-right modal-dlg modal-btn-submit' data-href='<?php echo site_url($controller_name."/excel_import"); ?>'
|
||||
title='<?php echo $this->lang->line('customers_import_items_excel'); ?>'>
|
||||
<span class="glyphicon glyphicon-import"> </span><?php echo $this->lang->line('common_import_excel'); ?>
|
||||
@@ -71,14 +71,14 @@ $(document).ready(function()
|
||||
|
||||
<div id="toolbar">
|
||||
<div class="pull-left form-inline" role="toolbar">
|
||||
<button id="delete" class="btn btn-default btn-sm">
|
||||
<button id="delete" class="btn btn-default btn-sm print_hide">
|
||||
<span class="glyphicon glyphicon-trash"> </span><?php echo $this->lang->line("common_delete"); ?>
|
||||
</button>
|
||||
<button id="bulk_edit" class="btn btn-default btn-sm modal-dlg modal-btn-submit" data-href='<?php echo site_url($controller_name."/bulk_edit"); ?>'
|
||||
<button id="bulk_edit" class="btn btn-default btn-sm modal-dlg modal-btn-submit print_hide" data-href='<?php echo site_url($controller_name."/bulk_edit"); ?>'
|
||||
title='<?php echo $this->lang->line('items_edit_multiple_items'); ?>'>
|
||||
<span class="glyphicon glyphicon-edit"> </span><?php echo $this->lang->line("items_bulk_edit"); ?>
|
||||
</button>
|
||||
<button id="generate_barcodes" class="btn btn-default btn-sm" data-href='<?php echo site_url($controller_name."/generate_barcodes"); ?>' title='<?php echo $this->lang->line('items_generate_barcodes');?>'>
|
||||
<button id="generate_barcodes" class="btn btn-default btn-sm print_hide" data-href='<?php echo site_url($controller_name."/generate_barcodes"); ?>' title='<?php echo $this->lang->line('items_generate_barcodes');?>'>
|
||||
<span class="glyphicon glyphicon-barcode"> </span><?php echo $this->lang->line("items_generate_barcodes"); ?>
|
||||
</button>
|
||||
<?php echo form_input(array('name'=>'daterangepicker', 'class'=>'form-control input-sm', 'id'=>'daterangepicker')); ?>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<div id="feedback_bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
<link rel="stylesheet" type="text/css" href="css/receipt.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/register.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/reports.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="css/tables.css"/>
|
||||
<!-- end css template tags -->
|
||||
<!-- bower:js -->
|
||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||
@@ -52,9 +51,9 @@
|
||||
<script src="bower_components/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.min.js"></script>
|
||||
<script src="bower_components/chartist-plugin-pointlabels/dist/chartist-plugin-pointlabels.min.js"></script>
|
||||
<script src="bower_components/chartist-plugin-tooltip/dist/chartist-plugin-tooltip.min.js"></script>
|
||||
<script src="bower_components/remarkable-bootstrap-notify/bootstrap-notify.js"></script>
|
||||
<!-- endbower -->
|
||||
<!-- start js template tags -->
|
||||
<script type="text/javascript" src="js/common.js" language="javascript"></script>
|
||||
<script type="text/javascript" src="js/imgpreview.full.jquery.js" language="javascript"></script>
|
||||
<script type="text/javascript" src="js/manage_tables.js" language="javascript"></script>
|
||||
<script type="text/javascript" src="js/nominatim.autocomplete.js" language="javascript"></script>
|
||||
@@ -67,10 +66,10 @@
|
||||
<!-- start mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=9ed20b1ee8"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=28f1496971"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=c7aa3101ab"/>
|
||||
<!-- end mincss template tags -->
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=01b7af18a8" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ed189b766b" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"chartist": "^0.9.7",
|
||||
"chartist-plugin-axistitle": "^0.1.0",
|
||||
"chartist-plugin-pointlabels": "^0.0.4",
|
||||
"chartist-plugin-tooltip": "https://github.com/Globegitter/chartist-plugin-tooltip/archive/master.zip"
|
||||
"chartist-plugin-tooltip": "https://github.com/Globegitter/chartist-plugin-tooltip/archive/master.zip",
|
||||
"remarkable-bootstrap-notify": "^3.1.3"
|
||||
},
|
||||
"overrides": {
|
||||
"bootswatch-dist": {
|
||||
|
||||
@@ -29,13 +29,6 @@ a.none
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.alert
|
||||
{
|
||||
margin-bottom: 0.1em;
|
||||
padding: 10px;
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
.jumbotron.push-spaces
|
||||
{
|
||||
margin:0; /*add this*/
|
||||
@@ -79,17 +72,6 @@ a.none
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#feedback_bar
|
||||
{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
line-height: 3.3;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#home_module_list
|
||||
{
|
||||
position: relative;
|
||||
|
||||
434
dist/opensourcepos.js
vendored
434
dist/opensourcepos.js
vendored
File diff suppressed because one or more lines are too long
4
dist/opensourcepos.min.css
vendored
4
dist/opensourcepos.min.css
vendored
File diff suppressed because one or more lines are too long
19
dist/opensourcepos.min.js
vendored
19
dist/opensourcepos.min.js
vendored
File diff suppressed because one or more lines are too long
16
js/common.js
16
js/common.js
@@ -1,16 +0,0 @@
|
||||
function set_feedback(text, classname, keep_displayed)
|
||||
{
|
||||
if(text)
|
||||
{
|
||||
$('#feedback_bar').removeClass().addClass(classname).html(text).css('opacity','1');
|
||||
|
||||
if(!keep_displayed)
|
||||
{
|
||||
$('#feedback_bar').fadeTo(5000, 1).fadeTo("fast",0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#feedback_bar').css('opacity','0');
|
||||
}
|
||||
}
|
||||
@@ -81,18 +81,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
dialog_support.error = {
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
}
|
||||
};
|
||||
|
||||
$.extend(dialog_support, {
|
||||
init: init,
|
||||
submit: submit,
|
||||
@@ -169,9 +157,9 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
|
||||
$.notify(response.message, { type: 'success' });
|
||||
} else {
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
$.notify(response.message, { type: 'pastel-danger' });
|
||||
}
|
||||
}, "json");
|
||||
} else {
|
||||
@@ -183,7 +171,7 @@
|
||||
return function(response) {
|
||||
typeof options.load_callback == 'function' && options.load_callback();
|
||||
options.load_callback = undefined;
|
||||
dialog_support.init("a.modal-dlg, button.modal-dlg");
|
||||
dialog_support.init("a.modal-dlg");
|
||||
typeof callback == 'function' && callback.call(this, response);
|
||||
}
|
||||
};
|
||||
@@ -236,6 +224,7 @@
|
||||
enable_actions();
|
||||
init_delete();
|
||||
toggle_column_visbility();
|
||||
dialog_support.init("button.modal-dlg");
|
||||
};
|
||||
|
||||
var init_delete = function (confirmMessage) {
|
||||
@@ -253,7 +242,7 @@
|
||||
var id = response.id;
|
||||
|
||||
if (!response.success) {
|
||||
set_feedback(response.message, 'alert alert-dismissible alert-danger', true);
|
||||
$.notify(response.text, { type: 'danger' });
|
||||
} else {
|
||||
var message = response.message;
|
||||
var selector = rows_selector(response.id);
|
||||
@@ -266,8 +255,8 @@
|
||||
$.each(selector, function (index, element) {
|
||||
var id = $(element).data('uniqueid');
|
||||
table().updateByUniqueId({id: id, row: response[id]});
|
||||
dialog_support.init(element + " a.modal-dlg");
|
||||
});
|
||||
dialog_support.init("a.modal-dlg");
|
||||
highlight_row(ids);
|
||||
},
|
||||
dataType: 'json'
|
||||
@@ -280,7 +269,7 @@
|
||||
};
|
||||
refresh();
|
||||
}
|
||||
set_feedback(message, 'alert alert-dismissible alert-success', false);
|
||||
$.notify(message, {type: 'success' });
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -298,4 +287,43 @@
|
||||
selected_ids : selected_ids,
|
||||
});
|
||||
|
||||
})(window.table_support = window.table_support || {}, jQuery);
|
||||
})(window.table_support = window.table_support || {}, jQuery);
|
||||
|
||||
(function(form_support, $) {
|
||||
|
||||
form_support.error = {
|
||||
errorClass: "has-error",
|
||||
errorLabelContainer: "#error_message_box",
|
||||
wrapper: "li",
|
||||
highlight: function (e) {
|
||||
$(e).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function (e) {
|
||||
$(e).closest('.form-group').removeClass('has-error');
|
||||
}
|
||||
};
|
||||
|
||||
form_support.handler = $.extend(form_support.error, {
|
||||
|
||||
submitHandler: function(form) {
|
||||
$(form).ajaxSubmit({
|
||||
success: function(response)
|
||||
{
|
||||
$.notify(response.message, { type: response.success ? 'success' : 'danger', delay: 100000});
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
rules:
|
||||
{
|
||||
|
||||
},
|
||||
|
||||
messages:
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})(window.form_support = window.form_support || {}, jQuery);
|
||||
@@ -60,11 +60,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=9ed20b1ee8"/>
|
||||
<!-- start mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=28f1496971"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=c7aa3101ab"/>
|
||||
<!-- end mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=01b7af18a8" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ed189b766b" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user