Skip to content

Commit 5414141

Browse files
committed
insight bugs fixed
1 parent 874c8c0 commit 5414141

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

Ajax/JsUtils.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function bootstrap(Bootstrap $bootstrap=NULL) {
109109
}
110110

111111
/**
112-
*
112+
* Returns
113113
* @param Semantic $semantic
114114
* @return Semantic
115115
*/
@@ -144,7 +144,7 @@ public function config($config=NULL) {
144144
}
145145

146146
/**
147-
* @param array $params ['driver'=>'jquery','debug'=>true,'defer'=>false,'ajaxTransition'=>null,'beforeCompileHtml'=>null]
147+
* @param array $params ['debug'=>true,'defer'=>false,'ajaxTransition'=>null,'beforeCompileHtml'=>null,'semantic'=>false,'bootstrap'=>false]
148148
* @param mixed $injected optional param for Symfony
149149
*/
150150
public function __construct($params=array(),$injected=NULL) {
@@ -217,7 +217,7 @@ public function output($array_js) {
217217
* gather together all script needing to be output
218218
*
219219
* @param View $view
220-
* @param $view_var
220+
* @param $view_var view script variable name, default : script_foot
221221
* @param $script_tags
222222
* @return string
223223
*/

Ajax/semantic/html/elements/HtmlButton.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Ajax\semantic\html\base\traits\LabeledIconTrait;
77
use Ajax\semantic\html\base\constants\Emphasis;
88
use Ajax\semantic\html\base\constants\Social;
9-
use Ajax\semantic\html\elements\html5\HtmlLink;
109

1110
/**
1211
* Semantic Button component
@@ -241,8 +240,6 @@ public static function icon($identifier, $icon) {
241240
*/
242241
public function asLink($href=NULL,$target=NULL) {
243242
parent::asLink($href,$target);
244-
/*$lnk=new HtmlLink("lnk-".$this->identifier,$href,$this->content,$target);
245-
$this->content=$lnk;*/
246243
return $this;
247244
}
248245
}

Ajax/semantic/html/modules/HtmlDropdown.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ class HtmlDropdown extends HtmlSemDoubleElement {
2323
protected $input;
2424
protected $value;
2525
protected $_associative;
26+
protected $_multiple;
2627

2728
public function __construct($identifier, $value="", $items=array(),$associative=true) {
2829
parent::__construct($identifier, "div");
2930
$this->_template=include dirname(__FILE__).'/../templates/tplDropdown.php';
3031
$this->setProperty("class", "ui dropdown");
32+
$this->_multiple=false;
3133
$content=[];
3234
if(isset($value)){
3335
if($value instanceof HtmlSemDoubleElement){
@@ -37,7 +39,7 @@ public function __construct($identifier, $value="", $items=array(),$associative=
3739
$text->setClass("text");
3840
$this->setValue($value);
3941
}
40-
$content=[$text];
42+
$content=["text"=>$text];
4143
}
4244
$content["arrow"]=new HtmlIcon("", "dropdown");
4345
$this->content=$content;
@@ -229,10 +231,12 @@ public function asButton($floating=false){
229231
}
230232

231233
public function asSelect($name=NULL,$multiple=false,$selection=true){
234+
$this->_multiple=$multiple;
232235
if(isset($name))
233236
$this->addInput($name);
234-
if($multiple)
237+
if($multiple){
235238
$this->addToProperty("class", "multiple");
239+
}
236240
if ($selection){
237241
if($this->propertyContains("class", "button")===false)
238242
$this->addToPropertyCtrl("class", "selection",array("selection"));
@@ -287,7 +291,7 @@ private function applyValue(){
287291
$this->setProperty("value", $value);
288292
}
289293
$textElement=$this->getElementById("text-".$this->identifier, $this->content);
290-
if(isset($textElement))
294+
if(isset($textElement) && !$this->_multiple)
291295
$textElement->setContent($value);
292296
return $this;
293297
}

Ajax/semantic/widgets/business/user/FormAccount.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,17 @@ public static function smallInline($identifier,$modelInstance=null){
4646

4747
public static function small($identifier,$modelInstance=null){
4848
$result=new FormAccount($identifier,$modelInstance,
49-
["login","password","submit"],
50-
["input0"=>[["rules"=>"empty"]],"input1"=>[["inputType"=>"password","rules"=>"empty"]],"submit"=>["green basic"]],
51-
["login","password","submit"],
52-
["Login","Password","Connection"],
49+
["login","password","passwordConf","email","submit"],
50+
[
51+
"input0"=>[["rules"=>"empty"]],
52+
"input1"=>[["inputType"=>"password","rules"=>['minLength[6]', 'empty']]],
53+
"input2"=>[["inputType"=>"password","rules"=> ['minLength[6]', 'empty', 'match[password]']]],
54+
"input3"=>[["rules"=>"email"]],
55+
"submit"=>["green basic"]],
56+
["login","password","passwordConf","email","submit"],
57+
["Login","Password","Password confirmation","Email address","Creation"],
5358
[1,2]);
54-
$result->addDividerBefore(0, "Connection");
59+
$result->addDividerBefore(0, "Creation");
5560
return $result;
5661
}
5762

0 commit comments

Comments
 (0)