* default block name when add block.

This commit is contained in:
wangyidong
2016-05-11 09:26:03 +08:00
parent ae532c0134
commit df55e68c97
4 changed files with 10 additions and 2 deletions

View File

@@ -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;

View File

@@ -20,7 +20,7 @@ function getBlocks(moduleID)
}
if(moduleID == 'html' || moduleID == 'dynamic' || moduleID == 'flowchart')
{
getNotSourceParams(moduleID);
getNotSourceParams(moduleID, blockID);
return true;
}

View File

@@ -38,3 +38,10 @@ if($type == 'html')
<tfoot><tr><td colspan='2' class='text-center'><?php echo html::submitButton()?></td></tr></tfoot>
</table>
</form>
<script>
$(function()
{
options = $('#modules').find("option").text();
if($('#title').val() == '') $('#title').val($('#modules').find("option:selected").text());
})
</script>

View File

@@ -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());
})
</script>
<?php endif;?>