mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/IZYIM-Prototype.git
synced 2026-08-19 12:43:58 +00:00
warehousenote
This commit is contained in:
+430
-944
File diff suppressed because it is too large
Load Diff
+1170
-2066
File diff suppressed because it is too large
Load Diff
+427
-941
File diff suppressed because it is too large
Load Diff
@@ -568,19 +568,51 @@ var FormEditable = function() {
|
||||
$('#address').editable({
|
||||
url: '/post',
|
||||
value: {
|
||||
city: "San Francisco",
|
||||
street: "Valencia",
|
||||
building: "#24"
|
||||
},
|
||||
validate: function(value) {
|
||||
if (value.city == '') return 'city is required!';
|
||||
city: "40",
|
||||
street: "40",
|
||||
building: "40"
|
||||
},
|
||||
display: function(value) {
|
||||
if (!value) {
|
||||
$(this).empty();
|
||||
return;
|
||||
}
|
||||
var html = '<b>' + $('<div>').text(value.city).html() + '</b>, ' + $('<div>').text(value.street).html() + ' st., bld. ' + $('<div>').text(value.building).html();
|
||||
var html = $('<div>').text(value.city).html() + ' x ' + $('<div>').text(value.street).html() + ' x ' + $('<div>').text(value.building).html();
|
||||
$(this).html(html);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#address2').editable({
|
||||
url: '/post',
|
||||
value: {
|
||||
city: "40",
|
||||
street: "40",
|
||||
building: "40"
|
||||
},
|
||||
display: function(value) {
|
||||
if (!value) {
|
||||
$(this).empty();
|
||||
return;
|
||||
}
|
||||
var html = $('<div>').text(value.city).html() + ' x ' + $('<div>').text(value.street).html() + ' x ' + $('<div>').text(value.building).html();
|
||||
$(this).html(html);
|
||||
}
|
||||
});
|
||||
|
||||
$('#address3').editable({
|
||||
url: '/post',
|
||||
value: {
|
||||
city: "40",
|
||||
street: "40",
|
||||
building: "40"
|
||||
},
|
||||
display: function(value) {
|
||||
if (!value) {
|
||||
$(this).empty();
|
||||
return;
|
||||
}
|
||||
var html = $('<div>').text(value.city).html() + ' x ' + $('<div>').text(value.street).html() + ' x ' + $('<div>').text(value.building).html();
|
||||
$(this).html(html);
|
||||
}
|
||||
});
|
||||
|
||||
+264
-1
@@ -1 +1,264 @@
|
||||
var TableDatatablesButtons=function(){var e=function(){var e=$("#sample_1");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn dark btn-outline"},{extend:"copy",className:"btn red btn-outline"},{extend:"pdf",className:"btn green btn-outline"},{extend:"excel",className:"btn yellow btn-outline "},{extend:"csv",className:"btn purple btn-outline "},{extend:"colvis",className:"btn dark btn-outline",text:"Columns"}],responsive:!0,order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})},t=function(){var e=$("#sample_2");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn default"},{extend:"copy",className:"btn default"},{extend:"pdf",className:"btn default"},{extend:"excel",className:"btn default"},{extend:"csv",className:"btn default"},{text:"Reload",className:"btn default",action:function(e,t,a,n){alert("Custom Button")}}],order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})},a=function(){var e=$("#sample_3"),t=e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn dark btn-outline"},{extend:"copy",className:"btn red btn-outline"},{extend:"pdf",className:"btn green btn-outline"},{extend:"excel",className:"btn yellow btn-outline "},{extend:"csv",className:"btn purple btn-outline "},{extend:"colvis",className:"btn dark btn-outline",text:"Columns"}],responsive:!0,order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10});$("#sample_3_tools > li > a.tool-action").on("click",function(){var e=$(this).attr("data-action");t.DataTable().button(e).trigger()})},n=function(){$(".date-picker").datepicker({rtl:App.isRTL(),autoclose:!0});var e=new Datatable;e.init({src:$("#datatable_ajax"),onSuccess:function(e,t){},onError:function(e){},onDataLoad:function(e){},loadingMessage:"Loading...",dataTable:{bStateSave:!0,lengthMenu:[[10,20,50,100,150,-1],[10,20,50,100,150,"All"]],pageLength:10,ajax:{url:"../demo/table_ajax.php"},order:[[1,"asc"]],buttons:[{extend:"print",className:"btn default"},{extend:"copy",className:"btn default"},{extend:"pdf",className:"btn default"},{extend:"excel",className:"btn default"},{extend:"csv",className:"btn default"},{text:"Reload",className:"btn default",action:function(e,t,a,n){t.ajax.reload(),alert("Datatable reloaded!")}}]}}),e.getTableWrapper().on("click",".table-group-action-submit",function(t){t.preventDefault();var a=$(".table-group-action-input",e.getTableWrapper());""!=a.val()&&e.getSelectedRowsCount()>0?(e.setAjaxParam("customActionType","group_action"),e.setAjaxParam("customActionName",a.val()),e.setAjaxParam("id",e.getSelectedRows()),e.getDataTable().ajax.reload(),e.clearAjaxParams()):""==a.val()?App.alert({type:"danger",icon:"warning",message:"Please select an action",container:e.getTableWrapper(),place:"prepend"}):0===e.getSelectedRowsCount()&&App.alert({type:"danger",icon:"warning",message:"No record selected",container:e.getTableWrapper(),place:"prepend"})}),$("#datatable_ajax_tools > li > a.tool-action").on("click",function(){var t=$(this).attr("data-action");e.getDataTable().button(t).trigger()})};return{init:function(){jQuery().dataTable&&(e(),t(),a(),n())}}}();jQuery(document).ready(function(){TableDatatablesButtons.init()});
|
||||
var TableDatatablesButtons = function() {
|
||||
var e = function() {
|
||||
var e = $("#sample_1");
|
||||
e.dataTable({
|
||||
language: {
|
||||
aria: {
|
||||
sortAscending: ": activate to sort column ascending",
|
||||
sortDescending: ": activate to sort column descending"
|
||||
},
|
||||
emptyTable: "No data available in table",
|
||||
info: "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
infoEmpty: "No entries found",
|
||||
infoFiltered: "(filtered1 from _MAX_ total entries)",
|
||||
lengthMenu: "_MENU_ entries",
|
||||
search: "Search:",
|
||||
zeroRecords: "No matching records found"
|
||||
},
|
||||
buttons: [{
|
||||
extend: "print",
|
||||
className: "btn dark btn-outline"
|
||||
}, {
|
||||
extend: "copy",
|
||||
className: "btn red btn-outline"
|
||||
}, {
|
||||
extend: "pdf",
|
||||
className: "btn green btn-outline"
|
||||
}, {
|
||||
extend: "excel",
|
||||
className: "btn yellow btn-outline "
|
||||
}, {
|
||||
extend: "csv",
|
||||
className: "btn purple btn-outline "
|
||||
}, {
|
||||
extend: "colvis",
|
||||
className: "btn dark btn-outline",
|
||||
text: "Columns"
|
||||
}],
|
||||
responsive: !0,
|
||||
order: [[0, "asc"]],
|
||||
lengthMenu: [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
|
||||
pageLength: 10,
|
||||
dom: "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"
|
||||
})
|
||||
}
|
||||
, t = function() {
|
||||
var e = $("#sample_2");
|
||||
e.dataTable({
|
||||
language: {
|
||||
aria: {
|
||||
sortAscending: ": activate to sort column ascending",
|
||||
sortDescending: ": activate to sort column descending"
|
||||
},
|
||||
emptyTable: "No data available in table",
|
||||
info: "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
infoEmpty: "No entries found",
|
||||
infoFiltered: "(filtered1 from _MAX_ total entries)",
|
||||
lengthMenu: "_MENU_ entries",
|
||||
search: "Search:",
|
||||
zeroRecords: "No matching records found"
|
||||
},
|
||||
buttons: [{
|
||||
extend: "print",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "copy",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "pdf",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "excel",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "csv",
|
||||
className: "btn default"
|
||||
}, {
|
||||
text: "Reload",
|
||||
className: "btn default",
|
||||
action: function(e, t, a, n) {
|
||||
alert("Custom Button")
|
||||
}
|
||||
}],
|
||||
order: [[0, "asc"]],
|
||||
lengthMenu: [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
|
||||
pageLength: 10,
|
||||
dom: "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"
|
||||
})
|
||||
}
|
||||
, a = function() {
|
||||
var e = $("#sample_3")
|
||||
, t = e.dataTable({
|
||||
language: {
|
||||
aria: {
|
||||
sortAscending: ": activate to sort column ascending",
|
||||
sortDescending: ": activate to sort column descending"
|
||||
},
|
||||
emptyTable: "No data available in table",
|
||||
info: "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
infoEmpty: "No entries found",
|
||||
infoFiltered: "(filtered1 from _MAX_ total entries)",
|
||||
lengthMenu: "_MENU_ entries",
|
||||
search: "Search:",
|
||||
zeroRecords: "No matching records found"
|
||||
},
|
||||
buttons: [{
|
||||
extend: "print",
|
||||
className: "btn dark btn-outline"
|
||||
}, {
|
||||
extend: "copy",
|
||||
className: "btn red btn-outline"
|
||||
}, {
|
||||
extend: "pdf",
|
||||
className: "btn green btn-outline"
|
||||
}, {
|
||||
extend: "excel",
|
||||
className: "btn yellow btn-outline "
|
||||
}, {
|
||||
extend: "csv",
|
||||
className: "btn purple btn-outline "
|
||||
}, {
|
||||
extend: "colvis",
|
||||
className: "btn dark btn-outline",
|
||||
text: "Columns"
|
||||
}],
|
||||
responsive: !0,
|
||||
order: [[0, "asc"]],
|
||||
lengthMenu: [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
|
||||
pageLength: 10
|
||||
});
|
||||
$("#sample_3_tools > li > a.tool-action").on("click", function() {
|
||||
var e = $(this).attr("data-action");
|
||||
t.DataTable().button(e).trigger()
|
||||
})
|
||||
}
|
||||
, f = function() {
|
||||
var e = $("#sample_4")
|
||||
, t = e.dataTable({
|
||||
language: {
|
||||
aria: {
|
||||
sortAscending: ": activate to sort column ascending",
|
||||
sortDescending: ": activate to sort column descending"
|
||||
},
|
||||
emptyTable: "No data available in table",
|
||||
info: "Showing _START_ to _END_ of _TOTAL_ entries",
|
||||
infoEmpty: "No entries found",
|
||||
infoFiltered: "(filtered1 from _MAX_ total entries)",
|
||||
lengthMenu: "_MENU_ entries",
|
||||
search: "Search:",
|
||||
zeroRecords: "No matching records found"
|
||||
},
|
||||
buttons: [{
|
||||
extend: "print",
|
||||
className: "btn dark btn-outline"
|
||||
}, {
|
||||
extend: "copy",
|
||||
className: "btn red btn-outline"
|
||||
}, {
|
||||
extend: "pdf",
|
||||
className: "btn green btn-outline"
|
||||
}, {
|
||||
extend: "excel",
|
||||
className: "btn yellow btn-outline "
|
||||
}, {
|
||||
extend: "csv",
|
||||
className: "btn purple btn-outline "
|
||||
}, {
|
||||
extend: "colvis",
|
||||
className: "btn dark btn-outline",
|
||||
text: "Columns"
|
||||
}],
|
||||
responsive: !0,
|
||||
order: [[0, "asc"]],
|
||||
lengthMenu: [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
|
||||
pageLength: 10
|
||||
});
|
||||
$("#sample_4_tools > li > a.tool-action").on("click", function() {
|
||||
var e = $(this).attr("data-action");
|
||||
t.DataTable().button(e).trigger()
|
||||
})
|
||||
}
|
||||
, n = function() {
|
||||
$(".date-picker").datepicker({
|
||||
rtl: App.isRTL(),
|
||||
autoclose: !0
|
||||
});
|
||||
var e = new Datatable;
|
||||
e.init({
|
||||
src: $("#datatable_ajax"),
|
||||
onSuccess: function(e, t) {},
|
||||
onError: function(e) {},
|
||||
onDataLoad: function(e) {},
|
||||
loadingMessage: "Loading...",
|
||||
dataTable: {
|
||||
bStateSave: !0,
|
||||
lengthMenu: [[10, 20, 50, 100, 150, -1], [10, 20, 50, 100, 150, "All"]],
|
||||
pageLength: 10,
|
||||
ajax: {
|
||||
url: "../demo/table_ajax.php"
|
||||
},
|
||||
order: [[1, "asc"]],
|
||||
buttons: [{
|
||||
extend: "print",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "copy",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "pdf",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "excel",
|
||||
className: "btn default"
|
||||
}, {
|
||||
extend: "csv",
|
||||
className: "btn default"
|
||||
}, {
|
||||
text: "Reload",
|
||||
className: "btn default",
|
||||
action: function(e, t, a, n) {
|
||||
t.ajax.reload(),
|
||||
alert("Datatable reloaded!")
|
||||
}
|
||||
}]
|
||||
}
|
||||
}),
|
||||
e.getTableWrapper().on("click", ".table-group-action-submit", function(t) {
|
||||
t.preventDefault();
|
||||
var a = $(".table-group-action-input", e.getTableWrapper());
|
||||
"" != a.val() && e.getSelectedRowsCount() > 0 ? (e.setAjaxParam("customActionType", "group_action"),
|
||||
e.setAjaxParam("customActionName", a.val()),
|
||||
e.setAjaxParam("id", e.getSelectedRows()),
|
||||
e.getDataTable().ajax.reload(),
|
||||
e.clearAjaxParams()) : "" == a.val() ? App.alert({
|
||||
type: "danger",
|
||||
icon: "warning",
|
||||
message: "Please select an action",
|
||||
container: e.getTableWrapper(),
|
||||
place: "prepend"
|
||||
}) : 0 === e.getSelectedRowsCount() && App.alert({
|
||||
type: "danger",
|
||||
icon: "warning",
|
||||
message: "No record selected",
|
||||
container: e.getTableWrapper(),
|
||||
place: "prepend"
|
||||
})
|
||||
}),
|
||||
$("#datatable_ajax_tools > li > a.tool-action").on("click", function() {
|
||||
var t = $(this).attr("data-action");
|
||||
e.getDataTable().button(t).trigger()
|
||||
})
|
||||
};
|
||||
return {
|
||||
init: function() {
|
||||
jQuery().dataTable && (e(),
|
||||
t(),
|
||||
a(),
|
||||
f(),
|
||||
n())
|
||||
}
|
||||
}
|
||||
}();
|
||||
jQuery(document).ready(function() {
|
||||
TableDatatablesButtons.init()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user