Skip to content

Commit

Permalink
Merge branch 'release/1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Apr 10, 2014
2 parents 9a822ad + 556d65a commit 8d6ed8f
Show file tree
Hide file tree
Showing 23 changed files with 86 additions and 45 deletions.
2 changes: 1 addition & 1 deletion fuel/application/config/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'filename' => 'Test_hooks.php',
'filepath' => 'hooks',
'params' => array(),
'module' => 'app',
'module' => 'app');
*/
// include hooks specific to FUEL
include(FUEL_PATH.'config/fuel_hooks.php');
Expand Down
2 changes: 1 addition & 1 deletion fuel/application/views/_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@


<ul class="bullets">
<li>Need help? Visit the <a href="http://forums.getfuelcms.com" target="_blank">FUEL CMS Forums</a>.</li>
<li>Need help? Visit the <a href="http://forum.getfuelcms.com" target="_blank">FUEL CMS Forum</a>.</li>
<li>Found a bug? <a href="https://github.com/daylightstudio/FUEL-CMS/issues" target="_blank">Report it on GitHub</a>.</li>
<li>Subscribe to our <a href="http://twitter.com/fuelcms">Twitter feed</a> for FUEL CMS notifications.</li>
<li>Visit our <a href="http://twitter.com/blog" target="_blank">blog</a> for tips and news.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ fuel.controller.AssetsController = jqx.createController(fuel.controller.BaseFuel
$assetSelect.change(function(e){
$assetPreview.html('<img src="' + jqx.config.assetsPath + selectedAssetFolder + '/' + $assetSelect.val() + '" />');
})
$assetSelect.keyup(function(e) {
$assetSelect.change();
return(false);
});
$assetSelect.change();
$('.img_only').show();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ fuel.controller.BaseFuelController = jqx.lib.BaseController.extend({
});

//$('#form input:first').select();
$('input,textarea', '#form').filter(':first').focus();
$(':input', '#form').filter(':first').focus();

if (jqx.config.warnIfModified) $.checksave('#fuel_main_content');
},
Expand Down
3 changes: 2 additions & 1 deletion fuel/modules/fuel/assets/js/fuel/custom_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fuel.fields.multi_field = function(context, inline_edit){

// markItUp! and CKeditor field
fuel.fields.wysiwyg_field = function(context){

$editors = $ckEditor = $('textarea', context).not('.no_editor, .markItUpEditor');
var module = fuel.getModule();
var _previewPath = myMarkItUpSettings.previewParserPath;
Expand Down Expand Up @@ -319,7 +320,6 @@ fuel.fields.wysiwyg_field = function(context){

// add preview to make it noticable and consistent
if ($textarea.parent().find('.editor_preview').length == 0){

var $previewBtn = $textarea.parent('.markItUpContainer').find('.markItUpHeader .preview');
if ($previewBtn){
$textarea.parent().append(previewButton);
Expand Down Expand Up @@ -884,6 +884,7 @@ fuel.fields.template_field = function(context, options){
options.min = $attrElem.attr('data-min');
options.dblClickBehavior = $attrElem.attr('data-dblclick');
options.initDisplay = $attrElem.attr('data-init_display');
options.removeable = $attrElem.attr('data-removeable');
options.addButtonText = fuel.lang('btn_add_another');
options.removeButtonText = fuel.lang('btn_remove');
options.warnBeforeDeleteMessage = fuel.lang('warn_before_delete_msg');
Expand Down
12 changes: 6 additions & 6 deletions fuel/modules/fuel/assets/js/fuel/fuel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ [email protected]
max : null,
min : null,
depth : 1,
allowCollapsingContent : true
allowCollapsingContent : true,
removeable : true
}, o || {});

// used for issue when renaming checkboxes
Expand Down Expand Up @@ -148,6 +149,7 @@ [email protected]
}

var createRemoveButton = function(elem){
if (!options.removeable) return;
$elem = $(elem);
if (!$elem.find('.' + options.removeButtonClass).length) {
var $remove = $elem.find(options.removeSelector + ':first');
Expand Down
2 changes: 1 addition & 1 deletion fuel/modules/fuel/config/fuel_constants.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// INSTALL_ROOT is defined in the index.php bootstrap file
define('FUEL_VERSION', '1.0.5');
define('FUEL_VERSION', '1.0.6');
define('MODULES_FOLDER', '../modules');
define('FUEL_FOLDER', 'fuel');
define('MODULES_PATH', APPPATH.MODULES_FOLDER.'/');
Expand Down
1 change: 1 addition & 0 deletions fuel/modules/fuel/controllers/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function upload($inline = FALSE)
'application/php',
'application/x-php',
'text/php',
'text/html',
'text/x-php',
'application/x-httpd-php-source',
'text/plain');
Expand Down
7 changes: 5 additions & 2 deletions fuel/modules/fuel/controllers/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function items()
$edit_func .= 'if (isset($cols[$CI->model->key_field()]))
{
$url = fuel_url("'.$this->module_uri.'/edit/".$cols[$CI->model->key_field()]);
$link = "<a href=\"".$url."\">".lang("table_action_delete")."</a>";
$link = "<a href=\"".$url."\" class=\"action_delete\">".lang("table_action_delete")."</a>";
$link .= " <input type=\"checkbox\" name=\"delete[".$cols[$CI->model->key_field()]."]\" value=\"1\" id=\"delete_".$cols[$CI->model->key_field()]."\" class=\"multi_delete\"/>";
}';
}
Expand All @@ -338,7 +338,7 @@ function items()
$delete_func .= 'if (isset($cols[$CI->model->key_field()]))
{
$url = fuel_url("'.$this->module_uri.'/delete/".$cols[$CI->model->key_field()]);
$link = "<a href=\"".$url."\">".lang("table_action_delete")."</a>";
$link = "<a href=\"".$url."\" class=\"action_delete\">".lang("table_action_delete")."</a>";
$link .= " <input type=\"checkbox\" name=\"delete[".$cols[$CI->model->key_field()]."]\" value=\"1\" id=\"delete_".$cols[$CI->model->key_field()]."\" class=\"multi_delete\"/>";
}';
}
Expand Down Expand Up @@ -2174,6 +2174,9 @@ protected function _process_upload_data($field_name, $uploaded_data, $posted)
{

$data[$field_name] = $val['file_name'];

// reset any validation to prevent issues with saving again (e.g. unique fields and the is_new function is problematic)
$this->model->remove_all_validation($data);
$this->model->save($data);
}
}
Expand Down
13 changes: 9 additions & 4 deletions fuel/modules/fuel/controllers/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ public function _form($id = NULL)

$field_values = (!empty($_POST)) ? $_POST : $saved;
$field_values['layout'] = $layout;

if (!empty($field_values['location'])) $this->preview_path = $field_values['location'];

// substitute data values into preview path
$this->preview_path = $this->module_obj->url($field_values);

$sort_arr = (empty($fields['navigation_label'])) ? array('location', 'layout', 'published', 'cache') : array('location', 'layout', 'navigation_label', 'published', 'cache');

Expand Down Expand Up @@ -377,10 +378,10 @@ public function _form($id = NULL)

// page variables
$layout = $this->fuel->layouts->get($layout);
$layout->set_field_values($page_vars);

if (!empty($layout))
{
$layout->set_field_values($page_vars);
$fields = $layout->fields();
$import_field = $layout->import_field();
}
Expand All @@ -390,6 +391,9 @@ public function _form($id = NULL)
$this->js_controller_params['import_field'] = $import_field;
}

// since the form builder is cleared above, we'll add in a script tag to make sure that the initialize code gets executed again
$this->form_builder->add_js('<script></script>');

$this->form_builder->id = 'layout_fields';
$this->form_builder->name_prefix = 'vars';
$this->form_builder->set_fields($fields);
Expand Down Expand Up @@ -928,7 +932,8 @@ public function upload()
'application/x-httpd-php',
'application/php',
'application/x-php',
'text/php',
'text/php',
'text/html',
'text/x-php',
'application/x-httpd-php-source',
'text/plain');
Expand Down
4 changes: 2 additions & 2 deletions fuel/modules/fuel/core/MY_DB_mysql_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function load_sql($sql_path, $is_path = TRUE)
$use_sql = 'USE '.$db;

$CI->db->query($use_sql);
$sql_arr = explode(";\n", $sql);
$sql_arr = explode(";\n", str_replace("\r\n", "\n", $sql));
foreach($sql_arr as $s)
{
$s = trim($s);
Expand All @@ -353,4 +353,4 @@ public function load_sql($sql_path, $is_path = TRUE)
}
}
/* End of file MY_DB_mysql_driver.php */
/* Location: ./application/libraries/MY_DB_mysql_driver.php */
/* Location: ./application/libraries/MY_DB_mysql_driver.php */
3 changes: 2 additions & 1 deletion fuel/modules/fuel/helpers/MY_url_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ function link_target($link, $exts = array())
{
$exts = array($exts);
}
$ext = end(explode('.', $link));
$link_parts = explode('.', $link);
$ext = end($link_parts);

// check if an http path and that it is from a different domain
if (is_http_path($link) AND $test_domain != $domain OR (!empty($exts) AND in_array($ext, $exts)))
Expand Down
2 changes: 1 addition & 1 deletion fuel/modules/fuel/libraries/Data_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ protected function _render_actions($actions, $fields)


$attrs = (!empty($val['attrs'])) ? ' '.$this->_render_attrs($val['attrs']) : '';
$actions[] ='<a href="'.$url.'"'.$attrs.'>'.$key.'</a>';
$actions[] ='<a href="'.$url.'"'.$attrs.' class="action_'.url_title($key, 'underscore', TRUE).'">'.$key.'</a>';
}
}

Expand Down
Loading

0 comments on commit 8d6ed8f

Please sign in to comment.