From 7f45db95ee0163a1875cee019c62eaaa0e718556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?GEGULA=EF=BF=BD?= Date: Wed, 16 Aug 2017 17:27:05 +0800 Subject: [PATCH] shipment arrangemnt --- public/Forwarder/shipmentarrange.html | 750 ++++++++++++++++++++++---- public/Forwarder/trackorder.html | 10 +- public/Forwarder/trackorder2.html | 4 +- public/Importer/trackorder.html | 10 +- 4 files changed, 654 insertions(+), 120 deletions(-) diff --git a/public/Forwarder/shipmentarrange.html b/public/Forwarder/shipmentarrange.html index e58c59c..e76dc3a 100644 --- a/public/Forwarder/shipmentarrange.html +++ b/public/Forwarder/shipmentarrange.html @@ -220,13 +220,7 @@ License: You must have a valid license purchased only from themeforest(the above - + + -
Order Details
+ - - -
-
+ +
@@ -522,6 +796,8 @@ Contact Person No: 0123456789 + + - + + + + @@ -1177,23 +1453,22 @@ Contact Person No: 0123456789 var dataSet = [ - ["1","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00006 5","CIEF/0008","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], - ["2","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00005 ","CIEF/0007","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","02-07-2017","02-07-2017","Delivery Request Sent", "Not Completed"], - ["3","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00004 ","CIEF/0006","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","01-07-2017","01-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], - ["4","03-07-2017","Vehicle No:JNY1122
Contact Person:Handsome
Contact No: 012345689"," 00003 5","CIEF/0005","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","30-06-2017","30-06-2017
Delayed
","Delivery Request Accepted
Fail to Ship
", "Not Completed"], - ["5","03-07-2017","Vehicle No:JNY1122
Contact Person:Hantam
Contact No: 012345689"," 00002 5","CIEF/0005","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","30-06-2017","30-06-2017
Delayed
","Delivery Request Accepted
Fail to Ship
", "Not Completed"], - ["6","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00001 5","CIEF/0003","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","28-06-2017","28-06-2017","Delivery Request Accepted
Fail to Ship
", "Not Completed"], - ["7","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00001 5","CIEF/0003","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","28-06-2017","28-06-2017","Delivery Request Completed", "Completed"], - ["8","03-07-2017","Vehicle No:JKB1111
Contact Person:Samad
Contact No: 012345689"," 00001 5","CIEF/0003","CTN56","Address: 7-7-17, Apartment Intana Ria 2, Jalan 7/4, Seksyen 7
Contact No: 0123456789","Bangi
Selangor","123456","28-06-2017","28-06-2017","Delivery Request Completed", "Completed"] + ["1","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], + ["2","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], + ["3","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], + ["4","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], + ["5","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], + ["6","123456","789ABC","01-08-2017","01-08-2017","01-08-2017","12345","Bangi
Selangor","123456","03-07-2017","03-07-2017
Delayed
","Delivery Request Sent", "Not Completed"], ]; - var dataSet2 = [ - ["","1","03-08-2017","CTN56","00006","CIEF/0008","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], - ["","2","03-08-2017","CTN55","00005","CIEF/0007","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], - ["","3","03-08-2017","CTN54","00004","CIEF/0006","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], - ["","4","03-08-2017","CTN53","00003","CIEF/0005","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], - ["","5","03-08-2017","CTN52","00002","CIEF/0004","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], - ["","6","03-08-2017","CTN51","00001","CIEF/0003","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"] + var dataSet2 = + [ + // ["","1","03-08-2017","CTN56","00006","CIEF/0008","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], + // ["","2","03-08-2017","CTN55","00005","CIEF/0007","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], + // ["","3","03-08-2017","CTN54","00004","CIEF/0006","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], + // ["","4","03-08-2017","CTN53","00003","CIEF/0005","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], + // ["","5","03-08-2017","CTN52","00002","CIEF/0004","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"], + // ["","6","03-08-2017","CTN51","00001","CIEF/0003","Bangi
Selangor","CBM :
Weight:
Qty of Carton:"] ]; @@ -1214,7 +1489,7 @@ Contact Person No: 0123456789 'targets': [0] }, { - "targets": [ 12 ], + "targets": [ 8 ], "visible": false }], // scroller extension: http://datatables.net/extensions/scroller/ @@ -1253,23 +1528,20 @@ Contact Person No: 0123456789 } } - - ], + + ], fixedHeader:false, columns: [ { title: "No" }, - { title: 'Delivery
Date
' }, - { title: 'Driver
Details
' }, - { title: 'Order No
' }, - { title: 'Customer
Code
' }, - { title: 'Shipment
No
' }, - { title: 'Customer
Details
' }, - { title: 'Area
State
' }, - { title: 'Container No
' }, + { title: 'Container
No
' }, + { title: 'Shipment
Reference
' }, + { title: 'Loading
Date
' }, { title: 'ETD
' }, - { title: 'ETA
' }, - { title: 'Status
' }, - { title: 'Stats' }, + { title: 'ETA
' }, + { title: 'Order
No
' }, + { title: 'Loading
Venue
' }, + // { title: 'Status
' }, + // { title: 'Stats' }, ], initComplete: function () { @@ -1314,14 +1586,14 @@ Contact Person No: 0123456789 "pageLength": 20, "order": [[ 1, "asc" ]], columns: [ - { title: "", className: "col_0"}, - { title: "No", className: "col_1"}, - { title: "ETA", className: "col_2"}, - { title: "Shipment
No", className: "col_3"}, - { title: "Order
No", className: "col_4"}, - { title: "Cust
Code", className: "col_5"}, - { title: "Area
State", className: "col_6"}, - { title: "Details", className: "col_7"}, + // { title: "", className: "col_0"}, + // { title: "No", className: "col_1"}, + // { title: "ETA", className: "col_2"}, + // { title: "Shipment
No", className: "col_3"}, + // { title: "Order
No", className: "col_4"}, + // { title: "Cust
Code", className: "col_5"}, + // { title: "Area
State", className: "col_6"}, + // { title: "Details", className: "col_7"}, ], "dom": "<'row' <'col-md-12'T>><'row'<'col-md-6'><'col-md-6'f>r>t<'row'<'col-md-5 col-sm-12'<'toolbar'>><'col-md-7 col-sm-12'p>>", @@ -1503,6 +1775,268 @@ Contact Person No: 0123456789 } +var FormWizard = function () { + + + return { + //main function to initiate the module + init: function () { + if (!jQuery().bootstrapWizard) { + return; + } + + function format(state) { + if (!state.id) return state.text; // optgroup + return "  " + state.text; + } + + $("#country_list").select2({ + placeholder: "Select", + allowClear: true, + formatResult: format, + width: 'auto', + formatSelection: format, + escapeMarkup: function (m) { + return m; + } + }); + + var form = $('#submit_form'); + var error = $('.alert-danger', form); + var success = $('.alert-success', form); + + form.validate({ + doNotHideMessage: true, //this option enables to show the error/success messages on tab switch. + errorElement: 'span', //default input error message container + errorClass: 'help-block help-block-error', // default input error message class + focusInvalid: false, // do not focus the last invalid input + rules: { + //account + username: { + minlength: 5, + required: true + }, + password: { + minlength: 5, + required: true + }, + rpassword: { + minlength: 5, + required: true, + equalTo: "#submit_form_password" + }, + //profile + fullname: { + required: true + }, + email: { + required: true, + email: true + }, + phone: { + required: true + }, + gender: { + required: true + }, + address: { + required: true + }, + city: { + required: true + }, + country: { + required: true + }, + //payment + card_name: { + required: true + }, + card_number: { + minlength: 16, + maxlength: 16, + required: true + }, + card_cvc: { + digits: true, + required: true, + minlength: 3, + maxlength: 4 + }, + card_expiry_date: { + required: true + }, + 'payment[]': { + required: true, + minlength: 1 + } + }, + + messages: { // custom messages for radio buttons and checkboxes + 'payment[]': { + required: "Please select at least one option", + minlength: jQuery.validator.format("Please select at least one option") + } + }, + + errorPlacement: function (error, element) { // render error placement for each input type + if (element.attr("name") == "gender") { // for uniform radio buttons, insert the after the given container + error.insertAfter("#form_gender_error"); + } else if (element.attr("name") == "payment[]") { // for uniform checkboxes, insert the after the given container + error.insertAfter("#form_payment_error"); + } else { + error.insertAfter(element); // for other inputs, just perform default behavior + } + }, + + invalidHandler: function (event, validator) { //display error alert on form submit + success.hide(); + error.show(); + App.scrollTo(error, -200); + }, + + highlight: function (element) { // hightlight error inputs + $(element) + .closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group + }, + + unhighlight: function (element) { // revert the change done by hightlight + $(element) + .closest('.form-group').removeClass('has-error'); // set error class to the control group + }, + + success: function (label) { + if (label.attr("for") == "gender" || label.attr("for") == "payment[]") { // for checkboxes and radio buttons, no need to show OK icon + label + .closest('.form-group').removeClass('has-error').addClass('has-success'); + label.remove(); // remove error label here + } else { // display success icon for other inputs + label + .addClass('valid') // mark the current input as valid and display OK icon + .closest('.form-group').removeClass('has-error').addClass('has-success'); // set success class to the control group + } + }, + + submitHandler: function (form) { + success.show(); + error.hide(); + form[0].submit(); + //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax + } + + }); + + var displayConfirm = function() { + $('#tab4 .form-control-static', form).each(function(){ + var input = $('[name="'+$(this).attr("data-display")+'"]', form); + if (input.is(":radio")) { + input = $('[name="'+$(this).attr("data-display")+'"]:checked', form); + } + if (input.is(":text") || input.is("textarea")) { + $(this).html(input.val()); + } else if (input.is("select")) { + $(this).html(input.find('option:selected').text()); + } else if (input.is(":radio") && input.is(":checked")) { + $(this).html(input.attr("data-title")); + } else if ($(this).attr("data-display") == 'payment[]') { + var payment = []; + $('[name="payment[]"]:checked', form).each(function(){ + payment.push($(this).attr('data-title')); + }); + $(this).html(payment.join("
")); + } + }); + } + + var handleTitle = function(tab, navigation, index) { + var total = navigation.find('li').length; + var current = index + 1; + // set wizard title + $('.step-title', $('#form_wizard_1')).text('Step ' + (index + 1) + ' of ' + total); + // set done steps + jQuery('li', $('#form_wizard_1')).removeClass("done"); + var li_list = navigation.find('li'); + for (var i = 0; i < index; i++) { + jQuery(li_list[i]).addClass("done"); + } + + if (current == 1) { + $('#form_wizard_1').find('.button-previous').hide(); + } else { + $('#form_wizard_1').find('.button-previous').show(); + } + + if (current >= total) { + $('#form_wizard_1').find('.button-next').hide(); + $('#form_wizard_1').find('.button-submit').show(); + displayConfirm(); + } else { + $('#form_wizard_1').find('.button-next').show(); + $('#form_wizard_1').find('.button-submit').hide(); + } + App.scrollTo($('.page-title')); + } + + // default form wizard + $('#form_wizard_1').bootstrapWizard({ + 'nextSelector': '.button-next', + 'previousSelector': '.button-previous', + onTabClick: function (tab, navigation, index, clickedIndex) { + return false; + + success.hide(); + error.hide(); + if (form.valid() == false) { + return false; + } + + handleTitle(tab, navigation, clickedIndex); + }, + onNext: function (tab, navigation, index) { + success.hide(); + error.hide(); + + if (form.valid() == false) { + return false; + } + + handleTitle(tab, navigation, index); + }, + onPrevious: function (tab, navigation, index) { + success.hide(); + error.hide(); + + handleTitle(tab, navigation, index); + }, + onTabShow: function (tab, navigation, index) { + var total = navigation.find('li').length; + var current = index + 1; + var $percent = (current / total) * 100; + $('#form_wizard_1').find('.progress-bar').css({ + width: $percent + '%' + }); + } + }); + + $('#form_wizard_1').find('.button-previous').hide(); + $('#form_wizard_1 .button-submit').click(function () { + alert('Finished! Hope you like it :)'); + }).hide(); + + //apply validation on select2 dropdown value change, this only needed for chosen dropdown integration. + $('#country_list', form).change(function () { + form.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input + }); + } + + }; + +}(); + +jQuery(document).ready(function() { + FormWizard.init(); +}); + diff --git a/public/Forwarder/trackorder.html b/public/Forwarder/trackorder.html index 151fc4c..e4d9b38 100644 --- a/public/Forwarder/trackorder.html +++ b/public/Forwarder/trackorder.html @@ -285,7 +285,7 @@ License: You must have a valid license purchased only from themeforest(the above
- Order List + Order Number
@@ -337,12 +337,12 @@ License: You must have a valid license purchased only from themeforest(the above
  • Order List
      -
    • - 014587 +
    • 014587 + group
    • -
    • - 014586 +
    • 014586 + group
  • diff --git a/public/Forwarder/trackorder2.html b/public/Forwarder/trackorder2.html index 10cad55..c2e6582 100644 --- a/public/Forwarder/trackorder2.html +++ b/public/Forwarder/trackorder2.html @@ -340,8 +340,8 @@ License: You must have a valid license purchased only from themeforest(the above
    - -
    + + diff --git a/public/Importer/trackorder.html b/public/Importer/trackorder.html index ddd727c..6cee546 100644 --- a/public/Importer/trackorder.html +++ b/public/Importer/trackorder.html @@ -263,7 +263,7 @@ License: You must have a valid license purchased only from themeforest(the above
    - Order List + Order Number
    @@ -315,12 +315,12 @@ License: You must have a valid license purchased only from themeforest(the above
  • Order List
      -
    • - 014587 +
    • 014587 + group
    • -
    • - 014586 +
    • 014586 + group