[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10471] property: condition survey
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10471] property: condition survey |
Date: |
Mon, 05 Nov 2012 13:27:08 +0000 |
Revision: 10471
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10471
Author: sigurdne
Date: 2012-11-05 13:27:08 +0000 (Mon, 05 Nov 2012)
Log Message:
-----------
property: condition survey
Modified Paths:
--------------
trunk/property/js/portico/condition_survey_edit.js
trunk/property/templates/base/condition_survey.xsl
Modified: trunk/property/js/portico/condition_survey_edit.js
===================================================================
--- trunk/property/js/portico/condition_survey_edit.js 2012-11-05 13:15:55 UTC
(rev 10470)
+++ trunk/property/js/portico/condition_survey_edit.js 2012-11-05 13:27:08 UTC
(rev 10471)
@@ -2,49 +2,28 @@
var arURLParts = strBaseURL.split('?');
var comboBase = arURLParts[0] + 'phpgwapi/inc/yui-combo-master/combo.php?';
-YUI({
+YUI_config = {
//Don't combine the files
combine: true,
//Ignore things that are already loaded (in this process)
ignoreRegistered: false,
//Set the base path
- comboBase:
comboBase,//'http://localhost/~sn5607/savannah_trunk/phpgwapi/inc/yui-combo-master/combo.php?',
+ comboBase: comboBase,
base: '',
//And the root
root: '',
//Require your deps
- require: [ 'node', 'yql', 'dom']
+ require: [ ]
+};
+
+
+YUI({
}).use(
'gallery-formvalidator',
function(Y) {
Y.on("domready", function () {
-
- /*
- var form = new Y.Validator(
+ var form = new Y.Validator(
{
- form:'basicExample1',
- defaultIncorrectIndicatorCss:'validator',
- defaultCorrectIndicatorCss:'indicator',
- createCorrectIndicator:true,
- createIncorrectIndicator:true
- }
- );
-
- var form2 = new Y.Validator(
- {
- form:'basicExample2',
- defaultIndicatorDomType:'DIV',
- defaultIncorrectIndicatorCss:'validator',
- defaultCorrectIndicatorCss:'indicator',
- createCorrectIndicator:true,
- createIncorrectIndicator:true,
- correctIndicatorText:'<span
class="indicator"> </span>',
- incorrectIndicatorText:'<span
class="validator"> </span>'
- }
- );
-*/
- var form3 = new Y.Validator(
- {
form:'form',
defaultIncorrectIndicatorCss:'validator',
defaultCorrectIndicatorCss:'indicator',
@@ -53,64 +32,6 @@
}
);
-
Y.Event.attach('click',function(){form.clear();},'#clearButton');
-
Y.Event.attach('click',function(){form2.clear();},'#clearButton2');
});
-
-});
-$(document).ready(function(){
-
- $("#form").submit(function(e){
-
- var thisForm = $(this);
-
- var $required_input_fields = $(this).find(".required");
- var status = true;
-
- // Checking that required fields (fields with class required)
is not null
- $required_input_fields.each(function() {
-
- // User has selected a value from select list
- if( $(this).is("select") & $(this).val() == 0 ){
- var nextElem = $(this).next();
-
- if( !$(nextElem).hasClass("input_error_msg") )
- $(this).after("<div class='input_error_msg'>" +
lang['please choose from list'] + "</div>");
-
- status = false;
- }
-
- // Input field is not empty
- else if( $(this).is("input") & $(this).val() == '' ){
- var nextElem = $(this).next();
-
- if( !$(nextElem).hasClass("input_error_msg") )
- $(this).after("<div class='input_error_msg'>" +
lang['please enter a value'] + "</div>");
-
- status = false;
- }
- else{
- var nextElem = $(this).next();
-
- if( $(nextElem).hasClass("input_error_msg") )
- $(nextElem).remove();
- }
- });
-
- if( $(thisForm).find('input[type=checkbox]:checked').length == 0){
-
- if(
!$(thisForm).find("ul.cases").prev().hasClass("input_error_msg") )
- $(thisForm).find("ul.cases").before("<div
class='input_error_msg'>" + lang['please choose an entry'] + "</div>");
-
- status = false;
- }
-
- if( !status ){
- e.preventDefault();
- }
-
- });
-
});
-
Modified: trunk/property/templates/base/condition_survey.xsl
===================================================================
--- trunk/property/templates/base/condition_survey.xsl 2012-11-05 13:15:55 UTC
(rev 10470)
+++ trunk/property/templates/base/condition_survey.xsl 2012-11-05 13:27:08 UTC
(rev 10471)
@@ -14,18 +14,6 @@
<xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:property.uicondition_survey.save')" />
</xsl:variable>
- <xsl:variable name="disabled">
- <xsl:choose>
- <xsl:when test="editable = 1">
- <xsl:text>disabled</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text></xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
-
<form name="form" id="form" action="{$action_url}"
method="post" ENCTYPE="multipart/form-data">
<div class="formBody">
<div class="row">
@@ -94,8 +82,8 @@
<div
class="clearDiv"></div>
</div>
+<!--
-
<div class="row">
<div class="label">
<label
for="age2">Age:</label>
@@ -119,13 +107,15 @@
formvalidator:maxInclusive="true"/>
<div class="clearDiv"></div>
</div>
+
+ -->
<div class="form-buttons">
<xsl:choose>
<xsl:when
test="editable = 1">
<xsl:variable
name="lang_save"><xsl:value-of select="php:function('lang', 'save')"
/></xsl:variable>
<xsl:variable
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')"
/></xsl:variable>
<input
type="submit" name="save_project" value="{$lang_save}" title = "{$lang_save}" />
- <input
type="submit" name="cancel_project" value="{$lang_cancel}" title =
"{$lang_cancel}" />
+ <input
class="submit" type="button" name="cancelButton" id ='cancelButton'
value="{$lang_cancel}" title = "{$lang_cancel}"
onClick="document.cancel_form.submit();"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')"
/></xsl:variable>
@@ -137,9 +127,15 @@
</div>
</div>
</form>
- </div>
+ <xsl:variable name="cancel_url">
+ <xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:property.uicondition_survey.index')" />
+ </xsl:variable>
+ <form name="cancel_form" id="cancel_form"
action="{$cancel_url}" method="post">
+ </form>
+ </div>
+
</div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10471] property: condition survey,
Sigurd Nes <=