Skip to content

Commit

Permalink
Dev Fixed flash message not shown.
Browse files Browse the repository at this point in the history
Dev Fixed tooltips not working.
  • Loading branch information
SamMousa committed Mar 13, 2013
1 parent 00be44e commit ca1a18b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
11 changes: 10 additions & 1 deletion application/controllers/AdminController.php
Expand Up @@ -329,7 +329,16 @@ public function _getAdminHeader($meta = false, $return = false)

$data['css_admin_includes'] = $this->_css_admin_includes(array(), true);

return $this->renderPartial("/admin/super/header", $data, $return);
$out = $this->renderPartial("/admin/super/header", $data, true);
App()->getClientScript()->render($out);
if ($return)
{
return $out;
}
else
{
echo $out;
}
}

/**
Expand Down
5 changes: 2 additions & 3 deletions application/extensions/FlashMessage/FlashMessage.php
@@ -1,6 +1,8 @@
<?php
class FlashMessage extends CWidget {
public function run() {
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('third_party') . 'jqueryui/js/jquery-ui-1.10.0.custom.js');
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . 'jquery/jquery.notify.js');
if (!empty(App()->session['flashmessage']) && Yii::app()->session['flashmessage'] != '')
{
$message = App()->session['flashmessage'];
Expand All @@ -12,9 +14,6 @@ public function run() {
{
$this->render('message', compact('key', 'message'));
}



}
}
?>
2 changes: 0 additions & 2 deletions application/extensions/FlashMessage/views/message.php
Expand Up @@ -9,6 +9,4 @@
<span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-info">&nbsp;</span>
<p><?php echo $message; ?></p><br>
</div>

<!-- other templates here, maybe.. -->
</div>
20 changes: 3 additions & 17 deletions application/views/admin/super/header.php
Expand Up @@ -16,6 +16,7 @@
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getConfig('adminstyleurl');?>adminstyle.css" />
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getConfig('styleurl');?>adminstyle.css" />
<?php
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . 'jquery/jquery.qtip.js');
if(!empty($css_admin_includes)) {
foreach ($css_admin_includes as $cssinclude)
{
Expand All @@ -35,6 +36,7 @@
<link rel="shortcut icon" href="<?php echo $baseurl;?>styles/favicon.ico" type="image/x-icon" />
<link rel="icon" href="<?php echo $baseurl;?>styles/favicon.ico" type="image/x-icon" />
<?php echo $firebug ?>
<?php $this->widget('ext.LimeScript.LimeScript'); ?>
</head>
<body>
<?php if(isset($formatdata)) { ?>
Expand All @@ -44,21 +46,5 @@
</script>
<?php } ?>
<div class='wrapper'>
<?php if(isset($flashmessage)) { ?>
<div id="flashmessage" style="display:none;">

<div id="themeroller" class="ui-state-highlight ui-corner-all">
<!-- close link -->
<a class="ui-notify-close" href="#">
<span class="ui-icon ui-icon-close" style="float:right">&nbsp;</span>
</a>

<!-- alert icon -->
<span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-info">&nbsp;</span>
<p><?php echo $flashmessage; ?></p><br>
</div>

<!-- other templates here, maybe.. -->
</div>
<?php } ?>
<?php $this->widget('ext.FlashMessage.FlashMessage'); ?>
<div class='maintitle'><?php echo $sitename; ?></div>

0 comments on commit ca1a18b

Please sign in to comment.