Skip to content

Commit

Permalink
Merge pull request #134 from deanblackborough/row-and-column-tool-fun…
Browse files Browse the repository at this point in the history
…ctionality

Row and column tool functionality
  • Loading branch information
deanblackborough committed Jul 17, 2016
2 parents 64b0ff8 + bd1fb14 commit 296e22b
Show file tree
Hide file tree
Showing 16 changed files with 1,367 additions and 1,216 deletions.
4 changes: 2 additions & 2 deletions application/configs/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
/**
* Version number and version release date
*/
$version_no = 'v0.99-alpha-1';
$version_release_date = '12th June 2016';
$version_no = 'v0.99-alpha-2';
$version_release_date = '17th July 2016';
29 changes: 14 additions & 15 deletions application/modules/content/controllers/DesignController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private function dlayerToolbar()

$this->view->page_selected = $this->session_content->pageSelected();
$this->view->row_id = $this->session_content->rowId();
$this->view->column_id = $this->session_content->columnId();
$this->view->content_id = $this->session_content->contentId();

$this->view->tools = $model_module->tools($this->getRequest()->getModuleName());
Expand Down Expand Up @@ -285,6 +286,15 @@ private function colorPickerData()
*
* @return string
*/

/**
* Generate the html for the requested tool tab, called via Ajax. The tool and tab are checked to ensure they are
* valid and active and then the data required to generate the tool tab is fetched and passed too the view
*
* @todo Update code, needs to actually check validity of tool and current status
* @throws \Exception
* @return string
*/
public function ribbonTabHtmlAction()
{
$this->_helper->disableLayout();
Expand All @@ -296,33 +306,28 @@ public function ribbonTabHtmlAction()
$ribbon = new Dlayer_Ribbon();
$ribbon_tab = new Dlayer_Ribbon_Tab();

if($tab != NULL && $tool != NULL)
if($tab !== NULL && $tool !== NULL)
{
$view_script = $ribbon_tab->viewScript($this->getRequest()->getModuleName(), $tool, $tab);
$multi_use = $ribbon_tab->multiUse($module, $tool, $tab);

if($view_script != FALSE)
if($view_script !== FALSE)
{

$this->session_content->setRibbonTab($tab);

$edit_mode = FALSE;
if($this->session_content->contentId() != NULL)
if($this->session_content->contentId() !== NULL)
{
$edit_mode = TRUE;
}

$this->view->color_picker_data = $this->colorPickerData();
$this->view->page_id = $this->session_content->pageId();
$this->view->data = $ribbon_tab->viewData($module, $tool, $tab, $multi_use, $edit_mode);
$this->view->edit_mode = $edit_mode;

$html = $this->view->render($ribbon->viewScriptPath($view_script));
}
else
{
$html = $this->view->render(
$ribbon->defaultViewScriptPath());
$html = $this->view->render($ribbon->defaultViewScriptPath());
}
}
else
Expand Down Expand Up @@ -378,12 +383,6 @@ private function dlayerPage()
$this->view->row_id = $this->session_content->rowId();
$this->view->content_id = $this->session_content->contentId();


var_dump('DesignController::dlayerPage(): Page: ' . $this->session_content->pageSelected());
var_dump('DesignController::dlayerPage(): Column: ' . $this->session_content->columnId());
var_dump('DesignController::dlayerPage(): Row: ' . $this->session_content->rowId());
var_dump('DesignController::dlayerPage(): Content: ' . $this->session_content->contentId());

return $this->view->render("design/page.phtml");
}

Expand Down
Loading

0 comments on commit 296e22b

Please sign in to comment.