Skip to content

Commit

Permalink
- modify config generator
Browse files Browse the repository at this point in the history
  • Loading branch information
杨豪 committed Jun 15, 2015
1 parent df7d623 commit 5b20919
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
7 changes: 6 additions & 1 deletion Src/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public function run()
private function getInitScript()
{
$editor_id = Html::getInputId($this->model,$this->attribute);
$options = json_encode($this->options['clientOptions']);
$options = "{";
foreach($this->options['clientOptions'] as $key=>$value){
$options .= sprintf("%s:%s",$key, json_encode($value)).",";
}
$options = rtrim($options,',');
$options.="}";

$editor_var = md5($editor_id);
$js = <<<_JS_
Expand Down
8 changes: 7 additions & 1 deletion Src/Mini.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ public function run()
private function getInitScript()
{
$editor_id = Html::getInputId($this->model,$this->attribute);
$options = json_encode($this->options['clientOptions']);
//$options = json_encode($this->options['clientOptions']);
$options = "{";
foreach($this->options['clientOptions'] as $key=>$value){
$options .= sprintf("%s:%s",$key, json_encode($value)).",";
}
$options = rtrim($options,',');
$options.="}";

$editor_var = md5($editor_id);
$js = <<<_JS_
Expand Down

0 comments on commit 5b20919

Please sign in to comment.