Skip to content

Commit 8b3dbfa

Browse files
committed
Adds lib identifier for q variable id in templates
1 parent cd7b92a commit 8b3dbfa

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

Ajax/common/Widget.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,4 +472,11 @@ public function asModal($header=null){
472472
public function addToProperty($name, $value, $separator=" ") {
473473
return $this->getHtmlComponent()->addToProperty($name,$value,$separator);
474474
}
475+
/**
476+
* @return mixed
477+
*/
478+
public function getModelInstance() {
479+
return $this->_modelInstance;
480+
}
481+
475482
}

Ajax/common/html/BaseHtml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function compile(JsUtils $js=NULL, &$view=NULL) {
223223
if (isset($js)===true) {
224224
$this->run($js);
225225
if (isset($view) === true) {
226-
$js->addViewElement($this->_identifier, $result, $view);
226+
$js->addViewElement($this->getLibraryId(), $result, $view);
227227
}
228228
}
229229

Ajax/common/html/BaseWidget.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
abstract class BaseWidget {
1313
protected $identifier;
1414
protected $_identifier;
15+
protected $_libraryId;
1516
protected $_self;
1617

1718
public function __construct($identifier) {
@@ -32,4 +33,21 @@ public function setIdentifier($identifier) {
3233
protected function cleanIdentifier($id) {
3334
return JString::cleanIdentifier($id);
3435
}
36+
/**
37+
* @return mixed
38+
*/
39+
public function getLibraryId() {
40+
if( isset($this->_libraryId)){
41+
return $this->_libraryId;
42+
}
43+
return $this->identifier;
44+
}
45+
46+
/**
47+
* @param mixed $_libraryId
48+
*/
49+
public function setLibraryId($_libraryId) {
50+
$this->_libraryId = $_libraryId;
51+
}
52+
3553
}

Ajax/semantic/html/collections/form/HtmlFormFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,6 @@ public function setEqualWidth($_equalWidth) {
144144

145145
public function run(JsUtils $js){
146146
$result= parent::run($js);
147-
return $result->setItemSelector("[data-value]");
147+
//return $result->setItemSelector("[data-value]");
148148
}
149149
}

0 commit comments

Comments
 (0)