[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17248] prepare for custom code outside tree
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17248] prepare for custom code outside tree |
Date: |
Wed, 1 Nov 2017 15:13:51 -0400 (EDT) |
Revision: 17248
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17248
Author: sigurdne
Date: 2017-11-01 15:13:51 -0400 (Wed, 01 Nov 2017)
Log Message:
-----------
prepare for custom code outside tree
Added Paths:
-----------
thirdparty/PE_custom/NLSH/property/inc/custom/default/ticket_NLSH_validate.js
Copied:
thirdparty/PE_custom/NLSH/property/inc/custom/default/ticket_NLSH_validate.js
(from rev 17218, trunk/property/inc/custom/default/ticket_NLSH_validate.js)
===================================================================
---
thirdparty/PE_custom/NLSH/property/inc/custom/default/ticket_NLSH_validate.js
(rev 0)
+++
thirdparty/PE_custom/NLSH/property/inc/custom/default/ticket_NLSH_validate.js
2017-11-01 19:13:51 UTC (rev 17248)
@@ -0,0 +1,71 @@
+
+$(document).ready(function ()
+{
+ show_feiltyper();
+
+ $("#global_category_id").change(function ()
+ {
+ show_feiltyper();
+ });
+
+});
+
+function show_feiltyper()
+{
+ document.getElementById('label_feiltyper').style.display = 'none';
+ document.getElementById('id_feiltyper').style.display = 'none';
+
+ var category_id = $("#global_category_id").val();
+
+ switch (category_id)
+ {
+ case '154': //Brann & sikkerhet
+ case '21': //Feilmelding
+ case '74': // Garanti
+ case '176': // title="Periodisk vedlikehold
+ if (my_groups[15]) // forvalter
+ {
+
document.getElementById('label_feiltyper').style.display = 'block';
+
document.getElementById('id_feiltyper').style.display = 'block';
+ }
+ break;
+ default:
+ }
+}
+
+function validate_submit()
+{
+ var error = false;
+ var feiltype_id = $("#id_feiltyper").val();
+ var category_id = $("#global_category_id").val();
+// var group_id = $("#global_category_id").val();
+ var status_id = $("#status_id").val();
+
+ switch (category_id)
+ {
+ case '154': //Brann & sikkerhet
+ case '21': //Feilmelding
+ case '74': // Garanti
+ case '176': // title="Periodisk vedlikehold
+ if (my_groups[15]) // forvalter
+ {
+ if (!feiltype_id && status_id == 'X')
+ {
+ error = true;
+ }
+ }
+ break;
+ default:
+ }
+
+
+ if (error)
+ {
+ alert('Feiltype må velges før meldingen kan avsluttes');
+ }
+ else
+ {
+ document.form.submit();
+ }
+}
+
Property changes on:
thirdparty/PE_custom/NLSH/property/inc/custom/default/ticket_NLSH_validate.js
___________________________________________________________________
Added: svn:mergeinfo
## -0,0 +1,3 ##
+/branches/dev-syncromind/property/inc/custom/default/ticket_NLSH_validate.js:13653
+/branches/dev-syncromind-2/property/inc/custom/default/ticket_NLSH_validate.js:14933-16846
+/branches/stavangerkommune/property/inc/custom/default/ticket_NLSH_validate.js:12743-12875,12986
\ No newline at end of property
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17248] prepare for custom code outside tree,
sigurdne <=