Add JS files
This commit is contained in:
64
modules/EcmServiceNews/javascript/EcmServiceNews.js
Executable file
64
modules/EcmServiceNews/javascript/EcmServiceNews.js
Executable file
@@ -0,0 +1,64 @@
|
||||
//START:
|
||||
$(document).ready(function() {
|
||||
$("#parent_name").attr("size", "65");
|
||||
lockEnter();
|
||||
$("input[value='Zobacz dziennik zmian']").hide();
|
||||
window.onbeforeunload = confirmExit;
|
||||
$("#register_date").prop("disabled", true);
|
||||
$("#assigned_user_name").prop("disabled", true);
|
||||
$("#btn_assigned_user_name").hide();
|
||||
$("#btn_clr_assigned_user_name").hide();
|
||||
if($("#document_no").val()==''){
|
||||
EcmDocumentNumberGenerator_getNumberTemplate('document_no', 'EcmServiceNews');
|
||||
}else{
|
||||
if($("[name='duplicateSave']").val() == 'true'){
|
||||
EcmDocumentNumberGenerator_getNumberTemplate('document_no', 'EcmServiceNews');
|
||||
}else{
|
||||
$("#document_no").prop('disabled', true);
|
||||
}
|
||||
|
||||
}
|
||||
DrawHeaders();
|
||||
getItems();
|
||||
});
|
||||
|
||||
function createProduct() {
|
||||
var newProdId = document.getElementById("newProductId");
|
||||
newProduct = window.open('index.php?module=EcmProducts&action=EditView&IamPopup=1', 'newProduct', 'toolbar=no,menubar=no,scrollbars=yes,scrollbars=1');
|
||||
newProduct.newProdId = newProdId;
|
||||
newProduct.focus();
|
||||
}
|
||||
|
||||
function confirmExit() {
|
||||
return "";
|
||||
}
|
||||
|
||||
function lockEnter() {
|
||||
// prevent default
|
||||
$(window).keydown(function(event) {
|
||||
if (event.keyCode == 13 && $(":focus").prop('tagName')!='TEXTAREA') {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
var check_form_ = check_form;
|
||||
check_form = function(formname) {
|
||||
clearEmpty();
|
||||
$("#position_list").val(JSON.stringifyNoSecurity(items));
|
||||
window.onbeforeunload = null;
|
||||
$(".loading_panel").css("display", "block");
|
||||
$("#register_date").prop("disabled", false);
|
||||
$("#assigned_user_name").prop("disabled", false);
|
||||
$(".loading_panel").css("display", "none");
|
||||
if (check_form_(formname) == false) {
|
||||
$("#register_date").prop("disabled", true);
|
||||
$("#assigned_user_name").prop("disabled", true);
|
||||
window.onbeforeunload = confirmExit;
|
||||
$(".loading_panel").css("display", "none");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
10
modules/EcmServiceNews/javascript/EcmServiceNewsDetail.js
Executable file
10
modules/EcmServiceNews/javascript/EcmServiceNewsDetail.js
Executable file
@@ -0,0 +1,10 @@
|
||||
//START:
|
||||
$(document).ready(function() {
|
||||
$("input[value='Zobacz dziennik zmian']").hide();
|
||||
|
||||
});
|
||||
|
||||
function createPDF(){
|
||||
var record = $("[name='record']").val();
|
||||
window.open('index.php?module=EcmServiceNews&action=createPDF&record='+ record +'&to_pdf=1','_blank');
|
||||
}
|
||||
1112
modules/EcmServiceNews/javascript/bimit_table.js
Executable file
1112
modules/EcmServiceNews/javascript/bimit_table.js
Executable file
File diff suppressed because it is too large
Load Diff
157
modules/EcmServiceNews/javascript/columndefs.js
Executable file
157
modules/EcmServiceNews/javascript/columndefs.js
Executable file
@@ -0,0 +1,157 @@
|
||||
columns = new Array();
|
||||
//define columns
|
||||
//begin: number
|
||||
columns[0] = {
|
||||
'name' : 'number',
|
||||
'label' : 'Lp.',
|
||||
'width' : 4,
|
||||
'content' : new Array(),
|
||||
};
|
||||
columns[0]['content'][0] = {'name' : '', 'type': 'text', 'readonly' : true};
|
||||
//end: number
|
||||
//begin: code
|
||||
columns[1] = {
|
||||
'name' : 'product_',
|
||||
'label' : 'Indeks',
|
||||
'width' : 6,
|
||||
'content' : new Array(),
|
||||
};
|
||||
columns[1]['content'][0] = {'name' : 'code', 'type': 'hidden', 'readonly' : true};
|
||||
columns[1]['content'][1] = {'name' : 'id', 'type': 'hidden'};
|
||||
columns[1]['content'][2] = {'name' : 'item_id', 'type': 'hidden'};
|
||||
columns[1]['content'][3] = {'name' : 'itemold_id', 'type': 'hidden'};
|
||||
columns[1]['content'][4] = {'name' : 'link', 'type': 'text', 'readonly' : true};
|
||||
columns[1]['content'][5] = {'name' : 'parent_doc_id', 'type': 'hidden'};
|
||||
columns[1]['content'][6] = {'name' : 'parent_doc_type', 'type': 'hidden'};
|
||||
columns[1]['content'][7] = {'name' : 'parent_doc_item_id', 'type': 'hidden'};
|
||||
columns[1]['content'][8] = {'name' : 'corrected', 'type': 'hidden'};
|
||||
columns[1]['content'][9] = {'name' : 'precision', 'type': 'hidden'};
|
||||
columns[1]['content'][10] = {'name' : 'ks_group', 'type': 'hidden'};
|
||||
columns[1]['content'][11] = {'name' : 'category_id', 'type': 'hidden'};
|
||||
columns[1]['content'][12] = {'name' : 'is_oo', 'type': 'hidden'};
|
||||
columns[1]['content'][13] = {
|
||||
'name' : 'is_consignment',
|
||||
'type' : 'hidden'
|
||||
};
|
||||
columns[1]['content'][14] = {
|
||||
'name' : 'consignment_part',
|
||||
'type' : 'text',
|
||||
};
|
||||
columns[1]['content'][15] = {
|
||||
'name' : 'consignment_id',
|
||||
'type' : 'hidden',
|
||||
};
|
||||
|
||||
columns[1]['content'][16] = {
|
||||
'name' : 'consignment_qty',
|
||||
'type' : 'hidden',
|
||||
};
|
||||
//end: code
|
||||
//begin: name
|
||||
columns[2] = {
|
||||
'name' : 'name',
|
||||
'label' : 'Nazwa',
|
||||
'width' : 20,
|
||||
'content' : new Array(),
|
||||
};
|
||||
columns[2]['content'][0] = {'name' : '', 'type': 'text'};
|
||||
//end: name
|
||||
//begin: quantity
|
||||
columns[3] = {
|
||||
'name' : 'quantity',
|
||||
'label' : 'Ilość',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[3]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
|
||||
//end: quantity
|
||||
//begin: unit
|
||||
columns[4] = {
|
||||
'name' : 'unit_',
|
||||
'label' : 'J.M.',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'center',
|
||||
};
|
||||
columns[4]['content'][0] = {'name' : 'name', 'type': 'text','readonly' : true};
|
||||
columns[4]['content'][1] = {'name' : 'id', 'type': 'hidden'};
|
||||
//end: unit
|
||||
//begin: price_start
|
||||
columns[5] = {
|
||||
'name' : 'price_start',
|
||||
'label' : 'Cena<br>początkowa',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[5]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
|
||||
columns[5]['content'][1] = {'name' : '_div', 'type': 'text'};
|
||||
//end: price_start
|
||||
//begin: discount
|
||||
columns[6] = {
|
||||
'name' : 'discount',
|
||||
'label' : 'Upust<br>(%)',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[6]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
|
||||
//end: discount
|
||||
//begin: price_netto
|
||||
columns[7] = {
|
||||
'name' : 'price_',
|
||||
'label' : 'Cena<br>po upuście',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[7]['content'][0] = {'name' : 'netto', 'type': 'text', 'isNumber' : true, 'readonly' : true};
|
||||
columns[7]['content'][1] = {'name' : 'brutto', 'type': 'hidden'};
|
||||
//end: price_start
|
||||
//begin: ecmvat
|
||||
columns[8] = {
|
||||
'name' : 'ecmvat_',
|
||||
'label' : 'VAT<br>(%)',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[8]['content'][0] = {'name' : 'name', 'type': 'text'};
|
||||
columns[8]['content'][1] = {'name' : 'value', 'type': 'hidden'};
|
||||
columns[8]['content'][2] = {'name' : 'id', 'type': 'hidden'};
|
||||
columns[8]['content'][3] = {'name' : 'alter_id', 'type': 'hidden'};
|
||||
columns[8]['content'][4] = {'name' : 'alter_value', 'type': 'hidden'};
|
||||
columns[8]['content'][5] = {'name' : 'alter_name', 'type': 'hidden'};
|
||||
//end: ecmvat
|
||||
//begin: total
|
||||
columns[9] = {
|
||||
'name' : 'total_',
|
||||
'label' : 'Wartość',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[9]['content'][0] = {'name' : 'netto', 'type': 'text', 'isNumber' : true, 'readonly' : true};
|
||||
columns[9]['content'][1] = {'name' : 'brutto', 'type': 'hidden'};
|
||||
columns[9]['content'][2] = {'name' : 'vat', 'type': 'hidden'};
|
||||
|
||||
//end: total
|
||||
|
||||
//begin: remarks
|
||||
columns[10] = {
|
||||
'name' : 'stock_state_',
|
||||
'label' : 'Stan Magazynowy',
|
||||
'width' : 5,
|
||||
'content' : new Array(),
|
||||
'align' : 'right',
|
||||
};
|
||||
columns[10]['content'][0] = {'name' : 'value', 'type': 'text','readonly' : true};
|
||||
//end: remarks
|
||||
//begin: options
|
||||
columns[11] = {
|
||||
'name' : 'options',
|
||||
'label' : 'Opcje',
|
||||
'width' : 3,
|
||||
'content' : new Array(),
|
||||
};
|
||||
Reference in New Issue
Block a user