From df55e68c97e88058e5cc281d07f461c415eb7c5a Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 11 May 2016 09:26:03 +0800 Subject: [PATCH] * default block name when add block. --- module/block/control.php | 1 + module/block/js/admin.js | 2 +- module/block/view/set.html.php | 7 +++++++ module/block/view/setmodule.html.php | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index 574dc19c03..456d00b9a4 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -64,6 +64,7 @@ class block extends control $this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id"); } + $this->view->title = $title; $this->view->block = $this->block->getByID($id); $this->view->blockID = $id; $this->view->title = $title; diff --git a/module/block/js/admin.js b/module/block/js/admin.js index 27ff73441b..3ff570046a 100644 --- a/module/block/js/admin.js +++ b/module/block/js/admin.js @@ -20,7 +20,7 @@ function getBlocks(moduleID) } if(moduleID == 'html' || moduleID == 'dynamic' || moduleID == 'flowchart') { - getNotSourceParams(moduleID); + getNotSourceParams(moduleID, blockID); return true; } diff --git a/module/block/view/set.html.php b/module/block/view/set.html.php index 0d23829266..ca3295ec99 100644 --- a/module/block/view/set.html.php +++ b/module/block/view/set.html.php @@ -38,3 +38,10 @@ if($type == 'html') + diff --git a/module/block/view/setmodule.html.php b/module/block/view/setmodule.html.php index 98e662347b..5e74a6abf7 100644 --- a/module/block/view/setmodule.html.php +++ b/module/block/view/setmodule.html.php @@ -62,7 +62,7 @@ $themeRoot = $webRoot . "theme/"; $(function() { options = $('#moduleBlock').find("option").text(); - if(options.indexOf($('#title').val()) >= 0) $('#title').val($('#moduleBlock').find("option:selected").text()); + if($('#title').val() == '') $('#title').val($('#moduleBlock').find("option:selected").text()); })