forked from Fabrik/fabrik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged master and also fixed markup for multi column forms
- Loading branch information
Showing
37 changed files
with
737 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php | ||
/** | ||
* Google Map helper class | ||
* | ||
* @package Joomla | ||
* @subpackage Fabrik.helpers | ||
* @copyright Copyright (C) 2005 Fabrik. All rights reserved. | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php | ||
*/ | ||
|
||
// Check to ensure this file is included in Joomla! | ||
defined('_JEXEC') or die(); | ||
|
||
/** | ||
* Google Map class | ||
* | ||
* @package Joomla | ||
* @subpackage Fabrik.helpers | ||
* @since 3.0 | ||
*/ | ||
|
||
class FabGoogleMapHelper | ||
{ | ||
/** | ||
* Set the google map style | ||
* | ||
* @param object $params Element/vis parameters (contains gmap_styles property as json string) | ||
* | ||
* @since 3.0.7 | ||
* | ||
* @return array Styles | ||
*/ | ||
|
||
public static function styleJs($params) | ||
{ | ||
$optStyles = array(); | ||
$styles = json_decode($params->get('gmap_styles')); | ||
if (!$styles) | ||
{ | ||
return array(); | ||
} | ||
|
||
// Map Feature type to style | ||
$features = $styles->style_feature; | ||
|
||
// What exactly to style in the feature type (road, fill, border etc) | ||
$elements = $styles->style_element; | ||
|
||
$styleKeys = $styles->style_styler_key; | ||
$styleValues = $styles->style_styler_value; | ||
|
||
// First merge any identical feature styles | ||
$stylers = array(); | ||
for ($i = 0; $i < count($features); $i ++) | ||
{ | ||
$feature = JArrayHelper::getValue($features, $i); | ||
$element = JArrayHelper::getValue($elements, $i); | ||
$key = $feature . '|' . $element; | ||
if (!array_key_exists($key, $stylers)) | ||
{ | ||
|
||
$stylers[$key] = array(); | ||
} | ||
$aStyle = new stdClass(); | ||
$styleKey = JArrayHelper::getValue($styleKeys, $i); | ||
$styleValue = JArrayHelper::getValue($styleValues, $i); | ||
if ($styleKey && $styleValue) | ||
{ | ||
$aStyle->$styleKey = $styleValue; | ||
$stylers[$key][] = $aStyle; | ||
} | ||
} | ||
$return = array(); | ||
foreach ($stylers as $styleKey => $styler) | ||
{ | ||
$o = new stdClass; | ||
$bits = explode('|', $styleKey); | ||
if ( $bits[0] !== 'all') | ||
{ | ||
$o->featureType = $bits[0]; | ||
$o->elementType = $bits[1]; | ||
} | ||
$o->stylers = $styler; | ||
$return[] = $o; | ||
} | ||
return $return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
components/com_fabrik/views/form/tmpl/bootstrap/default_actions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
$form = $this->form; | ||
if ($this->hasActions) : ?> | ||
<div class="fabrikActions form-actions"> | ||
<div class="row-fluid"> | ||
<div class="span4"> | ||
<div class="btn-group"> | ||
<?php | ||
echo $form->submitButton; | ||
echo $form->applyButton; | ||
echo $form->copyButton; | ||
?> | ||
</div> | ||
</div> | ||
<div class="span4"> | ||
<div class="btn-group"> | ||
<?php echo $form->nextButton . ' ' . $form->prevButton; ?> | ||
</div> | ||
</div> | ||
|
||
<div class="span4"> | ||
<div class="btn-group"> | ||
<?php | ||
echo $form->gobackButton . ' ' . $this->message; | ||
echo $form->resetButton . ' '; | ||
echo $form->deleteButton; | ||
?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<?php | ||
endif; |
21 changes: 21 additions & 0 deletions
21
components/com_fabrik/views/form/tmpl/bootstrap/default_buttons.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php if ($this->showEmail): ?> | ||
<a class="btn" href="<?php echo $this->emailURL?>"> | ||
<i class="icon-envelope"></i> | ||
<?php echo JText::_('JGLOBAL_EMAIL'); ?> | ||
</a> | ||
<?php endif; | ||
|
||
if ($this->showPDF):?> | ||
<a class="btn" href="<?php echo $this->pdfURL?>"> | ||
<i class="icon-file"></i> | ||
<?php echo JText::_('COM_FABRIK_PDF')?> | ||
</a> | ||
<?php endif; | ||
|
||
if ($this->showPrint):?> | ||
<a class="btn" href="<?php echo $this->printURL?>"> | ||
<i class="icon-print"></i> | ||
<?php echo JText::_('JGLOBAL_PRINT')?> | ||
</a> | ||
<?php | ||
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
components/com_fabrik/views/form/tmpl/bootstrap/default_group_labels_above.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php $element = $this->element;?> | ||
<div class="<?php echo $element->containerClass . $element->span; ?>"> | ||
<?php echo $element->label;?> | ||
|
||
<?php if ($this->tipLocation == 'above') : ?> | ||
<span class="help-block"><?php echo $element->tipAbove ?></span> | ||
<?php endif ?> | ||
|
||
<div class="fabrikElement"> | ||
<?php echo $element->element;?> | ||
</div> | ||
|
||
<div class="<?php echo $this->class?>"> | ||
<?php echo $element->error ?> | ||
</div> | ||
|
||
<?php if ($this->tipLocation == 'side') : ?> | ||
<span class="help-block"><?php echo $element->tipAbove ?></span> | ||
<?php endif ?> | ||
|
||
<?php if ($this->tipLocation == 'below') :?> | ||
<span class="help-block"><?php echo $element->tipAbove ?></span> | ||
<?php endif ?> | ||
</div> | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
components/com_fabrik/views/form/tmpl/bootstrap/default_group_labels_side.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
<?php $element = $this->element; ?> | ||
<div class="control-group <?php echo $element->containerClass . $element->span; ?>"> | ||
<?php echo $element->label;?> | ||
<div class="controls"> | ||
|
||
<?php if ($this->tipLocation == 'above') : ?> | ||
<p class="help-block"><?php echo $element->tipAbove ?></p> | ||
<?php endif ?> | ||
|
||
<div class="fabrikElement"> | ||
<?php echo $element->element;?> | ||
</div> | ||
|
||
<div class="<?php echo $this->class?>"> | ||
<?php echo $element->error ?> | ||
</div> | ||
|
||
<?php if ($this->tipLocation == 'side') : ?> | ||
<p class="help-block"><?php echo $element->tipAbove ?></p> | ||
<?php endif ?> | ||
|
||
</div> | ||
|
||
<?php if ($this->tipLocation == 'below') :?> | ||
<p class="help-block"><?php echo $element->tipAbove ?></p> | ||
<?php endif ?> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.