Skip to content

Commit 399f526

Browse files
committed
Groups selector +docs fixed
1 parent 7ff1b88 commit 399f526

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

Ajax/common/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function setEdition($_edition=true) {
250250

251251
/**
252252
* Defines the default function which displays fields value
253-
* @param callable $defaultValueFunction
253+
* @param callable $defaultValueFunction. function parameters are : $name : the field name, $value : the field value ,$index : the field index, $instance : the active instance of model
254254
* @return \Ajax\common\Widget
255255
*/
256256
public function setDefaultValueFunction($defaultValueFunction){

Ajax/common/traits/JsUtilsAjaxTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public function jsonArray($maskSelector, $url, $method="get", $params="{}", $jsC
8080
* @param string $params JSON parameters
8181
* @param string $method Method used
8282
* @param string $jsCallback javascript code to execute after the request
83-
* @param string $jqueryDone the jquery function call on ajax data. default:html
8483
*/
8584
public function jsonArrayDeferred($maskSelector, $url, $method="get", $params="{}", $jsCallback=NULL) {
8685
return $this->js->_jsonArray($maskSelector, $url, $method, $params, $jsCallback, NULL, false);

Ajax/semantic/html/base/traits/FieldAsFormField.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

Ajax/semantic/html/elements/HtmlIconGroups.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Ajax\semantic\html\base\HtmlSemCollection;
66
use Ajax\service\JArray;
7+
use Ajax\JsUtils;
78

89
/**
910
* Semantic Icons group component
@@ -40,6 +41,11 @@ public function getIcon($index) {
4041
return $this->content[$index];
4142
}
4243

44+
public function run(JsUtils $js){
45+
$result= parent::run($js);
46+
return $result->setItemSelector("i");
47+
}
48+
4349
public function toCorner($index=1) {
4450
$this->getItem($index)->toCorner();
4551
return $this;

Ajax/semantic/html/elements/HtmlSegmentGroups.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Ajax\semantic\html\base\constants\SegmentType;
66
use Ajax\semantic\html\base\HtmlSemCollection;
77
use Ajax\semantic\html\base\constants\Sens;
8+
use Ajax\JsUtils;
89

910
class HtmlSegmentGroups extends HtmlSemCollection{
1011

@@ -36,6 +37,11 @@ public function setSens($sens=Sens::VERTICAL){
3637
return $this->addToPropertyCtrl("class", $sens, Sens::getConstants());
3738
}
3839

40+
public function run(JsUtils $js){
41+
$result= parent::run($js);
42+
return $result->setItemSelector(".ui.segment");
43+
}
44+
3945
public static function group($identifier,$items=array(),$type="",$sens=Sens::VERTICAL){
4046
$group=new HtmlSegmentGroups($identifier,$items);
4147
$group->setSens($sens);

Ajax/semantic/widgets/base/InstanceViewer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function _beforeAddProperty($index,&$field){
5656

5757
protected function _getDefaultValue($name,$value,$index){
5858
$func=$this->defaultValueFunction;
59-
return $func($name,$value,$index);
59+
return $func($name,$value,$index,$this->instance);
6060
}
6161

6262
protected function _getValue($property,$index){

0 commit comments

Comments
 (0)