Skip to content

Commit

Permalink
added showOn to date field and fixed issue with CKEditor and issues w…
Browse files Browse the repository at this point in the history
…hen the image has a parenthesis in the name
  • Loading branch information
David McReynolds committed Jun 25, 2014
1 parent 8634c4b commit f501fc9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fuel/modules/fuel/assets/js/fuel/custom_fields.js
Expand Up @@ -33,7 +33,8 @@ fuel.fields.datetime_field = function(context){
region : $(this).attr('data-region'),
minDate : $(this).attr('data-min_date'),
maxDate : $(this).attr('data-max_date'),
firstDay : $(this).attr('data-first_day')
firstDay : $(this).attr('data-first_day'),
showOn : $(this).attr('data-show_on')
};
var opts = $.extend(o, options);
$.datepicker.regional[o.region];
Expand Down Expand Up @@ -197,8 +198,8 @@ fuel.fields.wysiwyg_field = function(context){
// // Output dimensions of images as width and height attributes on src
if ( element.name == 'img' && hasCKEditorImagePlugin) {
var src = element.attributes['src'];
img = src.replace(/^\{img_path\(([^\)]+)\)\}/, function(match, contents, offset, s) {
return contents;
img = src.replace(/^\{img_path\(([^\}]+)\}/, function(match, contents, offset, s) {
return contents.substr(0, contents.length -1);
}
);
img = img.replace(jqx_config.assetsImgPath, '');
Expand Down Expand Up @@ -292,8 +293,8 @@ fuel.fields.wysiwyg_field = function(context){
}

var unTranslateImgPath = function(txt){
txt = txt.replace(/\{img_path\(([^\)]+)\)\}/g, function(match, contents, offset, s) {
contents = contents.replace(/'|"/g, '');
txt = txt.replace(/\{img_path\(([^\}]+)\)\}/g, function(match, contents, offset, s) {
contents = contents.replace(/'|"/g, '').substr(0, contents.length -1);
return jqx_config.assetsImgPath + contents;
}
);
Expand Down

0 comments on commit f501fc9

Please sign in to comment.