From 11fd61fe8ad87ea1c1afe47398eecac66b35bcdf Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 29 Jan 2014 15:55:18 +0000 Subject: [PATCH] fixed indention and ide warning about missing docu --- etemplate/js/et2_core_inputWidget.js | 4 +++ etemplate/js/et2_widget_color.js | 40 +++++++++++++++------------- etemplate/js/et2_widget_textbox.js | 20 +++++++------- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/etemplate/js/et2_core_inputWidget.js b/etemplate/js/et2_core_inputWidget.js index 6e1a8fad12..1fa3be1202 100644 --- a/etemplate/js/et2_core_inputWidget.js +++ b/etemplate/js/et2_core_inputWidget.js @@ -87,6 +87,8 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], /** * Load the validation errors from the server + * + * @param {object} _attrs */ transformAttributes: function(_attrs) { this._super.apply(this, arguments); @@ -246,6 +248,8 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], /** * Set tab index + * + * @param {number} index */ set_tabindex: function(index) { jQuery(this.getInputNode()).attr("tabindex", index); diff --git a/etemplate/js/et2_widget_color.js b/etemplate/js/et2_widget_color.js index 7333b6aece..d150abae9f 100644 --- a/etemplate/js/et2_widget_color.js +++ b/etemplate/js/et2_widget_color.js @@ -21,9 +21,9 @@ /** * Class which implements the "colorpicker" XET-Tag - * + * * @augments et2_inputWidget - */ + */ var et2_color = et2_inputWidget.extend( { attributes: { @@ -52,7 +52,7 @@ var et2_color = et2_inputWidget.extend( /** * Constructor - * + * * @memberOf et2_color */ init: function() { @@ -107,7 +107,7 @@ var et2_color = et2_inputWidget.extend( // Initialize jPicker this.options.color.active = new jQuery.jPicker.Color({hex:this.value}); - + // Do this to get a reference to the actual jPicker used, so we can fully remove it in destroy() var list_id = jQuery.jPicker.List.length ? jQuery.jPicker.List.length : 0; @@ -140,7 +140,7 @@ var et2_color = et2_inputWidget.extend( }); // Hide original move bar - jQuery('table.jPicker .Move').hide(); + jQuery('table.jPicker .Move').hide(); // Trigger dialog opening jQuery('.Image',self.$node.next()).click(function() { @@ -196,11 +196,11 @@ et2_register_widget(et2_color, ["colorpicker"]); * et2_textbox_ro is the dummy readonly implementation of the textbox. * @augments et2_valueWidget */ -var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM], +var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM], { /** * Constructor - * + * * @memberOf et2_color_ro */ init: function() { @@ -220,20 +220,22 @@ var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM], this.$node.css("background-color", _value); }, /** - * Code for implementing et2_IDetachedDOM - */ - getDetachedAttributes: function(_attrs) - { - _attrs.push("value"); - }, + * Code for implementing et2_IDetachedDOM + * + * @param {array} _attrs array to add further attributes to + */ + getDetachedAttributes: function(_attrs) + { + _attrs.push("value"); + }, - getDetachedNodes: function() - { - return [this.node]; - }, + getDetachedNodes: function() + { + return [this.node]; + }, - setDetachedAttributes: function(_nodes, _values) - { + setDetachedAttributes: function(_nodes, _values) + { this.span = jQuery(_nodes[0]); if(typeof _values["value"] != 'undefined') { diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index 7764906d64..24a059e172 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -20,9 +20,9 @@ /** * Class which implements the "textbox" XET-Tag - * + * * @augments et2_inputWidget - */ + */ var et2_textbox = et2_inputWidget.extend( { attributes: { @@ -69,7 +69,7 @@ var et2_textbox = et2_inputWidget.extend( /** * Constructor - * + * * @memberOf et2_textbox */ init: function() { @@ -152,14 +152,14 @@ var et2_textbox = et2_inputWidget.extend( }, /** - * Set HTML readonly attribute. + * Set HTML readonly attribute. * Do not confuse this with etemplate readonly, which would use et_textbox_ro instead * @param _readonly Boolean */ set_readonly: function(_readonly) { this.input.attr("readonly", _readonly); }, - + set_blur: function(_value) { if(_value) { this.input.attr("placeholder", _value + ""); // HTML5 @@ -181,10 +181,10 @@ et2_register_widget(et2_textbox, ["textbox", "passwd"]); /** * et2_textbox_ro is the dummy readonly implementation of the textbox. - * + * * @augments et2_valueWidget */ -var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], +var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], { /** * Ignore all more advanced attributes. @@ -215,7 +215,7 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], /** * Constructor - * + * * @memberOf et2_textbox_ro */ init: function() { @@ -236,7 +236,7 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], // Remove current label this.span.contents() .filter(function(){ return this.nodeType == 3; }).remove(); - + var parts = et2_csvSplit(label, 2, "%s"); this.span.prepend(parts[0]); this.span.append(parts[1]); @@ -254,6 +254,8 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], }, /** * Code for implementing et2_IDetachedDOM + * + * @param {array} _attrs array to add further attributes to */ getDetachedAttributes: function(_attrs) {