");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('
').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
\ No newline at end of file
diff --git a/datamodels/2.x/itop-attachments/main.attachments.php b/datamodels/2.x/itop-attachments/main.attachments.php
index dd891f203..b78054fa3 100755
--- a/datamodels/2.x/itop-attachments/main.attachments.php
+++ b/datamodels/2.x/itop-attachments/main.attachments.php
@@ -1,5 +1,5 @@
-
class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExtension
{
protected static $m_bIsModified = false;
@@ -204,6 +203,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
$sTitle = ($oSet->Count() > 0)? Dict::Format('Attachments:TabTitle_Count', $oSet->Count()) : Dict::S('Attachments:EmptyTabTitle');
$oPage->SetCurrentTab($sTitle);
}
+ $sMaxWidth = MetaModel::GetModuleSetting('itop-attachment', 'inline_image_max_width', '450px');
$oPage->add_style(
<<
add('');
@@ -243,15 +246,24 @@ EOF
$sIsDeleteEnabled = $this->m_bDeleteEnabled ? 'true' : 'false';
$iTransactionId = $oPage->GetTransactionId();
$sClass = get_class($oObject);
+ $iObjectId = $oObject->Getkey();
$sTempId = session_id().'_'.$iTransactionId;
$sDeleteBtn = Dict::S('Attachments:DeleteBtn');
$oPage->add_script(
<<GetFileName();
$sIcon = utils::GetAbsoluteUrlAppRoot().AttachmentPlugIn::GetFileIcon($sFileName);
$sPreview = $oDoc->IsPreviewAvailable() ? 'true' : 'false';
- $sDownloadLink = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=download_document&class=Attachment&id='.$iAttId.'&field=contents';
+ $sDownloadLink = utils::GetAbsoluteUrlAppRoot().ATTACHMENT_DOWNLOAD_URL.$iAttId;
$oPage->add('');
}
@@ -291,10 +303,10 @@ EOF
$oDoc = $oAttachment->Get('contents');
$sFileName = $oDoc->GetFileName();
$sIcon = utils::GetAbsoluteUrlAppRoot().AttachmentPlugIn::GetFileIcon($sFileName);
- $sDownloadLink = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=download_document&class=Attachment&id='.$iAttId.'&field=contents';
+ $sDownloadLink = utils::GetAbsoluteUrlAppRoot().ATTACHMENT_DOWNLOAD_URL.$iAttId;
$sPreview = $oDoc->IsPreviewAvailable() ? 'true' : 'false';
$oPage->add('');
- $oPage->add_ready_script("$('#attachment_plugin').trigger('add_attachment', [$iAttId, '".addslashes($sFileName)."']);");
+ $oPage->add_ready_script("$('#attachment_plugin').trigger('add_attachment', [$iAttId, '".addslashes($sFileName)."', false /* not an line image */]);");
}
}
}
@@ -305,9 +317,21 @@ EOF
$oPage->p(Dict::S('Attachments:AddAttachment').' '.$sMaxUpload);
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.iframe-transport.js');
- $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.fileupload.js');
-
-$oPage->add_ready_script(
+ $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.fileupload.js');
+
+ $oPage->add_linked_stylesheet(utils::GetAbsoluteUrlModulesRoot().'itop-attachments/css/magnific-popup.css');
+ $oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-attachments/js/jquery.magnific-popup.min.js');
+ $maxWidth = MetaModel::GetModuleSetting('itop-standard-email-synchro', 'inline_image_max_width', '');
+ if ($maxWidth !== '')
+ {
+ $sStyle = "style=\"max-width:{$maxWidth}px;cursor:zoom-in;\"";
+ }
+ else
+ {
+ $sStyle = "style=\"cursor:zoom-in;\"";
+ }
+ $sDownloadLink = utils::GetAbsoluteUrlAppRoot().ATTACHMENT_DOWNLOAD_URL;
+ $oPage->add_ready_script(
<<< EOF
$('#file').fileupload({
url: GetAbsoluteUrlModulesRoot()+'itop-attachments/ajax.attachment.php',
@@ -323,13 +347,13 @@ $oPage->add_ready_script(
}
else
{
- var sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?operation=download_document&class=Attachment&id='+data.result.att_id+'&field=contents';
+ var sDownloadLink = '$sDownloadLink'+data.result.att_id;
$('#attachments').append('');
if($sIsDeleteEnabled)
{
$('#display_attachment_'+data.result.att_id).hover( function() { $(this).children(':button').toggleClass('btn_hidden'); } );
}
- $('#attachment_plugin').trigger('add_attachment', [data.result.att_id, data.result.msg]);
+ $('#attachment_plugin').trigger('add_attachment', [data.result.att_id, data.result.msg, false /* inline image */]);
}
}
},
@@ -380,7 +404,65 @@ $oPage->add_ready_script(
window.dropZoneTimeout = null;
dropZone.removeClass('drag_in');
}, 300);
- });
+ });
+
+ // Hook the file upload of all CKEditor instances
+ $('.htmlEditor').each(function() {
+ var oEditor = $(this).ckeditorGet();
+ oEditor.config.extraPlugins = 'uploadimage';
+ oEditor.config.uploadUrl = GetAbsoluteUrlModulesRoot()+'itop-attachments/ajax.attachment.php';
+ oEditor.config.filebrowserBrowseUrl = GetAbsoluteUrlModulesRoot()+'itop-attachments/ajax.attachment.php?operation=cke_browse&temp_id=$sTempId&obj_class=$sClass&obj_key=$iObjectId';
+ oEditor.on( 'fileUploadResponse', function( evt ) {
+ // Get XHR and response.
+ var data = evt.data,
+ xhr = data.fileLoader.xhr,
+ response = xhr.responseText.split( '|' );
+
+ var oValues = JSON.parse(response[0]);
+
+ var sDownloadLink = '$sDownloadLink'+oValues.att_id;
+ $('#attachments').append('');
+ if(true)
+ {
+ $('#display_attachment_'+oValues.att_id).hover( function() { $(this).children(':button').toggleClass('btn_hidden'); } );
+ }
+ $('#attachment_plugin').trigger('add_attachment', [oValues.att_id, oValues.msg, true /* inline image */]);
+ } );
+
+ oEditor.on( 'fileUploadRequest', function( evt ) {
+ evt.data.fileLoader.uploadUrl += '?operation=cke_img_upload&temp_id=$sTempId&obj_class=$sClass';
+ }, null, null, 4 ); // Listener with priority 4 will be executed before priority 5.
+
+ });
+
+ $('img[data-att-id]').each(function() {
+ if ('$sMaxWidth' != '')
+ {
+ $(this).css({'max-width': '$sMaxWidth', width: '', height: '', 'max-height': ''});
+ }
+ $(this).addClass('inline-image').attr('href', $(this).attr('src'));
+ }).magnificPopup({type: 'image', closeOnContentClick: true });
+
+ // check if the attachments are used by inline images
+ window.setTimeout( function() {
+ $('.attachment a').each(function() {
+ var sUrl = $(this).attr('href');
+ if($('img[src="'+sUrl+'"]').length > 0)
+ {
+ $(this).addClass('image-in-use').find('img').wrap('
');
+ }
+ });
+ $('.htmlEditor').each(function() {
+ var oEditor = $(this).ckeditorGet();
+ var sHtml = oEditor.getData();
+ var jElement = $('
').html(sHtml).contents();
+ jElement.find('img').each(function() {
+ var sSrc = $(this).attr('src');
+ $('.attachment a[href="'+sSrc+'"]').parent().addClass('image-in-use').find('img').wrap('
');
+ });
+ });
+ $('.image-in-use-wrapper').append('');
+ }, 200 );
EOF
);
$oPage->p('Loading, please wait... ');
@@ -406,7 +488,7 @@ EOF
$sFileName = $oDoc->GetFileName();
$sIcon = utils::GetAbsoluteUrlAppRoot().AttachmentPlugIn::GetFileIcon($sFileName);
$sPreview = $oDoc->IsPreviewAvailable() ? 'true' : 'false';
- $sDownloadLink = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=download_document&class=Attachment&id='.$iAttId.'&field=contents';
+ $sDownloadLink = utils::GetAbsoluteUrlAppRoot().ATTACHMENT_DOWNLOAD_URL.$iAttId;
$oPage->add('');
}
}
@@ -415,7 +497,24 @@ EOF
$oPage->add(' ');
$sPreviewNotAvailable = addslashes(Dict::S('Attachments:PreviewNotAvailable'));
$iMaxWidth = MetaModel::GetModuleSetting('itop-attachments', 'preview_max_width', 290);
- $oPage->add_ready_script("$(document).tooltip({ items: '.attachment a', position: { my: 'left top', at: 'right top', using: function( position, feedback ) { $( this ).css( position ); }}, content: function() { if ($(this).attr('data-preview') == 'true') { return(' ');} else { return '$sPreviewNotAvailable'; }}});");
+ $oPage->add_ready_script(
+<<');} else { return '$sPreviewNotAvailable'; }}
+ });
+
+ $('img[data-att-id]').each(function() {
+ if ('$sMaxWidth' != '')
+ {
+ $(this).css({'max-width': '$sMaxWidth', width: '', height: '', 'max-height': ''});
+ }
+ $(this).addClass('inline-image');
+ $(this).attr('href', $(this).attr('src'));
+ }).magnificPopup({type: 'image', closeOnContentClick: true });
+EOF
+ );
}
protected static function UpdateAttachments($oObject, $oChange = null)
diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
index 277591027..8b894bf6d 100755
--- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
+++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
@@ -130,6 +130,7 @@
description
false
+ html
true
diff --git a/dictionaries/cs.dictionary.itop.core.php b/dictionaries/cs.dictionary.itop.core.php
index e77405e94..eb21a0d36 100755
--- a/dictionaries/cs.dictionary.itop.core.php
+++ b/dictionaries/cs.dictionary.itop.core.php
@@ -1,6 +1,6 @@
'Možnosti tabulky',
'Core:BulkExport:OptionNoLocalize' => 'Nepřekládat hodnoty číselníků',
'Core:BulkExport:OptionLinkSets' => 'Zahrnout odkazované objekty',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definice objektů k exportu',
'Core:BulkExportLabelOQLExpression' => 'Dotaz OQL:',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/da.dictionary.itop.core.php b/dictionaries/da.dictionary.itop.core.php
index e041b6a93..530d3cd26 100644
--- a/dictionaries/da.dictionary.itop.core.php
+++ b/dictionaries/da.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/de.dictionary.itop.core.php b/dictionaries/de.dictionary.itop.core.php
index 2dd668430..a23c1c253 100644
--- a/dictionaries/de.dictionary.itop.core.php
+++ b/dictionaries/de.dictionary.itop.core.php
@@ -1,5 +1,5 @@
- * @copyright Copyright (C) 2010-2012 Combodo SARL
+ * @copyright Copyright (C) 2010-2016 Combodo SARL
* @licence http://opensource.org/licenses/AGPL-3.0
*/
@@ -590,6 +590,7 @@ Operatoren:
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet-Optionen',
'Core:BulkExport:OptionNoLocalize' => 'Werte von Aufzählungsfeldern nicht lokalisieren',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve Textformatierung',
'Core:BulkExport:ScopeDefinition' => 'Definition der zu exportierenden Objekte',
'Core:BulkExportLabelOQLExpression' => 'OQL-Abfrage',
'Core:BulkExportLabelPhrasebookEntry' => 'Query-Bibliotheks-Eintrag:',
diff --git a/dictionaries/dictionary.itop.core.php b/dictionaries/dictionary.itop.core.php
index 8a4acfd7a..e30f736bc 100644
--- a/dictionaries/dictionary.itop.core.php
+++ b/dictionaries/dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Spreadsheet Options',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:',
diff --git a/dictionaries/es_cr.dictionary.itop.core.php b/dictionaries/es_cr.dictionary.itop.core.php
index d12b89959..fc5e5ff1b 100644
--- a/dictionaries/es_cr.dictionary.itop.core.php
+++ b/dictionaries/es_cr.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Spreadsheet Options~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/fr.dictionary.itop.core.php b/dictionaries/fr.dictionary.itop.core.php
index 9b0696401..99d5d2595 100644
--- a/dictionaries/fr.dictionary.itop.core.php
+++ b/dictionaries/fr.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Core:BulkExport:SpreadsheetOptions' => 'Options du format HTML pour Excel',
'Core:BulkExport:OptionNoLocalize' => 'Ne pas traduire les valeurs (pour les champs de type "Enum")',
'Core:BulkExport:OptionLinkSets' => 'Inclure les objets liés',
+ 'Core:BulkExport:OptionFormattedText' => 'Préserver le formatage du texte',
'Core:BulkExport:ScopeDefinition' => 'Définition des objets à exporter',
'Core:BulkExportLabelOQLExpression' => 'Requête OQL:',
'Core:BulkExportLabelPhrasebookEntry' => 'Entrée du livre des requêtes:',
diff --git a/dictionaries/hu.dictionary.itop.core.php b/dictionaries/hu.dictionary.itop.core.php
index e508d63d3..7ebe279db 100755
--- a/dictionaries/hu.dictionary.itop.core.php
+++ b/dictionaries/hu.dictionary.itop.core.php
@@ -1,5 +1,5 @@
/**
- * @copyright Copyright (C) 2010-2012 Combodo SARL
+ * @copyright Copyright (C) 2010-2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -593,6 +593,7 @@ Operators:
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/it.dictionary.itop.core.php b/dictionaries/it.dictionary.itop.core.php
index 41b6ec51c..49820eb7f 100644
--- a/dictionaries/it.dictionary.itop.core.php
+++ b/dictionaries/it.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Spreadsheet Options~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/ja.dictionary.itop.core.php b/dictionaries/ja.dictionary.itop.core.php
index 44150057c..880d26bbf 100644
--- a/dictionaries/ja.dictionary.itop.core.php
+++ b/dictionaries/ja.dictionary.itop.core.php
@@ -1,5 +1,5 @@
/**
- * @copyright Copyright (C) 2010-2012 Combodo SARL
+ * @copyright Copyright (C) 2010-2016 Combodo SARL
* @licence http://opensource.org/licenses/AGPL-3.0
*/
@@ -615,6 +615,7 @@ Operators:
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/nl.dictionary.itop.core.php b/dictionaries/nl.dictionary.itop.core.php
index 9cffc4e54..e162531c8 100644
--- a/dictionaries/nl.dictionary.itop.core.php
+++ b/dictionaries/nl.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/pt_br.dictionary.itop.core.php b/dictionaries/pt_br.dictionary.itop.core.php
index dc738ce02..334991334 100644
--- a/dictionaries/pt_br.dictionary.itop.core.php
+++ b/dictionaries/pt_br.dictionary.itop.core.php
@@ -1,5 +1,5 @@
'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/ru.dictionary.itop.core.php b/dictionaries/ru.dictionary.itop.core.php
index 8eb3511c1..176b11123 100644
--- a/dictionaries/ru.dictionary.itop.core.php
+++ b/dictionaries/ru.dictionary.itop.core.php
@@ -833,6 +833,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/tr.dictionary.itop.core.php b/dictionaries/tr.dictionary.itop.core.php
index 0e9eb1310..f46fd5feb 100644
--- a/dictionaries/tr.dictionary.itop.core.php
+++ b/dictionaries/tr.dictionary.itop.core.php
@@ -1,5 +1,5 @@
- * @copyright Copyright (C) 2010-2012 Combodo SARL
+ * @copyright Copyright (C) 2010-2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -765,6 +765,7 @@ Operators:
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/dictionaries/zh.dictionary.itop.core.php b/dictionaries/zh.dictionary.itop.core.php
index 6f1315724..24e206b9c 100644
--- a/dictionaries/zh.dictionary.itop.core.php
+++ b/dictionaries/zh.dictionary.itop.core.php
@@ -1,5 +1,5 @@
- * @copyright Copyright (C) 2010-2012 Combodo SARL
+ * @copyright Copyright (C) 2010-2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -764,6 +764,7 @@ Operators:
'Core:BulkExport:SpreadsheetOptions' => 'Spreadsheet Options~~',
'Core:BulkExport:OptionLinkSets' => 'Include linked objects~~',
'Core:BulkExport:OptionNoLocalize' => 'Do not localize the values (for Enumerated fields)~~',
+ 'Core:BulkExport:OptionFormattedText' => 'Preserve text formatting~~',
'Core:BulkExport:ScopeDefinition' => 'Definition of the objects to export~~',
'Core:BulkExportLabelOQLExpression' => 'OQL Query:~~',
'Core:BulkExportLabelPhrasebookEntry' => 'Query Phrasebook Entry:~~',
diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js
index fd82aec51..d87f4ae9b 100644
--- a/js/forms-json-utils.js
+++ b/js/forms-json-utils.js
@@ -249,6 +249,16 @@ function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue)
else
{
sTextContent = oFormattedContents.contents().find("body").text();
+
+ if (sTextContent == '')
+ {
+ // No plain text, maybe there is just an image...
+ var oImg = oFormattedContents.contents().find("body img");
+ if (oImg.length != 0)
+ {
+ sTextContent = 'image';
+ }
+ }
}
if (bMandatory && (sTextContent == ''))
diff --git a/js/jquery.tablesorter.pager.js b/js/jquery.tablesorter.pager.js
index f32310641..1db8728fc 100644
--- a/js/jquery.tablesorter.pager.js
+++ b/js/jquery.tablesorter.pager.js
@@ -15,19 +15,22 @@ function sprintf(format, etc) {
function setPageSize(table,size, bReload) {
var c = table.config;
- c.selectedSize = size;
- if (size == -1)
+ if (c != undefined)
{
- size = c.totalRows;
+ c.selectedSize = size;
+ if (size == -1)
+ {
+ size = c.totalRows;
+ }
+ c.size = size;
+ c.totalPages = Math.ceil(c.totalRows / c.size);
+ c.pagerPositionSet = false;
+ if (bReload)
+ {
+ moveToPage(table);
+ }
+ fixPosition(table);
}
- c.size = size;
- c.totalPages = Math.ceil(c.totalRows / c.size);
- c.pagerPositionSet = false;
- if (bReload)
- {
- moveToPage(table);
- }
- fixPosition(table);
}
function fixPosition(table) {
@@ -246,6 +249,8 @@ function sprintf(format, etc) {
function applySelection(table)
{
var c = table.config;
+ if (c == undefined) return;
+
if (c.selectionMode == 'negative')
{
$(table).find(':checkbox[name^=selectObj]').attr('checked', true);
diff --git a/js/simple_graph.js b/js/simple_graph.js
index a2817742a..15c6915bd 100644
--- a/js/simple_graph.js
+++ b/js/simple_graph.js
@@ -834,7 +834,7 @@ $(function()
jTab.find('span').html(sTabText+' ');
}
$.post(sUrl, oParams, function(data) {
- var sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?operation=download_document&class=Attachment&id='+data.att_id+'&field=contents';
+ var sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?operation=download_document&class=Attachment&field=contents&id='+data.att_id;
var sIcon = GetAbsoluteUrlModulesRoot()+'itop-attachments/icons/pdf.png';
if (jTab != null)
{
diff --git a/portal/images/company_logo.png b/portal/images/company_logo.png
index 8f9f434f8..ecc258fb4 100644
Binary files a/portal/images/company_logo.png and b/portal/images/company_logo.png differ
diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php
index 6ba3580fd..460c58d47 100644
--- a/setup/compiler.class.inc.php
+++ b/setup/compiler.class.inc.php
@@ -1219,6 +1219,7 @@ EOF;
// Added if present...
//
$aParameters['validation_pattern'] = $this->GetPropString($oField, 'validation_pattern');
+ $aParameters['format'] = $this->GetPropString($oField, 'format');
$aParameters['width'] = $this->GetPropString($oField, 'width');
$aParameters['height'] = $this->GetPropString($oField, 'height');
$aParameters['digits'] = $this->GetPropNumber($oField, 'digits');