jsharmony-cms 1.15.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -272,7 +272,7 @@
272
272
  <# }); #>
273
273
 
274
274
  <div>
275
- <# if(_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], (new_media.ext||'').toLowerCase())){ #>
275
+ <# if(_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], (new_media.ext||'').toLowerCase())){ #>
276
276
  <div class="diff_media_preview preview_media" data-media_key="<#=new_media.key#>" data-media_id="<#=new_media.id#>" data-media_ext="<#=new_media.ext#>" data-media_width="<#=new_media.width#>" data-media_height="<#=new_media.height#>">
277
277
  <#=desc#>:<br/>
278
278
  <img src="<%=jsh._BASEURL%>_funcs/media/<#=new_media.key#>/file_preview?media_id=<#=new_media.id#>" />
@@ -116,13 +116,13 @@
116
116
 
117
117
  <# if(branch_media.old_media_file_id != branch_media.new_media_file_id){ #>
118
118
  <div>
119
- <# if(_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], (branch_media.old_media_ext||'').toLowerCase())){ #>
119
+ <# if(_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], (branch_media.old_media_ext||'').toLowerCase())){ #>
120
120
  <div class="diff_media_preview previous_media" data-media_key="<#=branch_media.media_key#>" data-media_id="<#=branch_media.media_orig_id#>" data-media_ext="<#=branch_media.old_media_ext#>" data-media_width="<#=branch_media.old_media_width#>" data-media_height="<#=branch_media.old_media_height#>">
121
121
  Prev:<br/>
122
122
  <img src="<%=jsh._BASEURL%>_funcs/media/<#=branch_media.media_key#>/file_preview?media_id=<#=branch_media.media_orig_id#>" />
123
123
  </div>
124
124
  <# } #>
125
- <# if(_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], (branch_media.new_media_ext||'').toLowerCase())){ #>
125
+ <# if(_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], (branch_media.new_media_ext||'').toLowerCase())){ #>
126
126
  <div class="diff_media_preview new_media" data-media_key="<#=branch_media.media_key#>" data-media_id="<#=branch_media.media_id#>" data-media_ext="<#=branch_media.new_media_ext#>" data-media_width="<#=branch_media.new_media_width#>" data-media_height="<#=branch_media.new_media_height#>">
127
127
  New:<br/>
128
128
  <img src="<%=jsh._BASEURL%>_funcs/media/<#=branch_media.media_key#>/file_preview?media_id=<#=branch_media.media_id#>" />
@@ -163,7 +163,7 @@ module.exports = exports = function(module, funcs){
163
163
  for(var thumbnail_id in branchData.site_config.media_thumbnails){
164
164
  var thumbnail_config = branchData.site_config.media_thumbnails[thumbnail_id];
165
165
  if(!thumbnail_config || !thumbnail_config.export) continue;
166
- if(!_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], media.media_ext)) continue;
166
+ if(!_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], media.media_ext)) continue;
167
167
  if((patharr.length >= 5) && patharr[4]) patharr[4] = thumbnail_id;
168
168
  else patharr.splice(4,0,thumbnail_id);
169
169
  rslt[thumbnail_id] = urlparts.protocol + '//' + urlparts.host + patharr.join('/') + (urlparts.search||'') + (urlparts.hash||'');
@@ -1894,7 +1894,7 @@ module.exports = exports = function(module, funcs){
1894
1894
  function(generate_cb){
1895
1895
  async.eachOf(branchData.site_config.media_thumbnails, function(thumbnail_config, thumbnail_id, thumbnail_cb){
1896
1896
  if(!thumbnail_config || !thumbnail_config.export) return thumbnail_cb();
1897
- if(!_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], media.media_ext)) return thumbnail_cb();
1897
+ if(!_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], media.media_ext)) return thumbnail_cb();
1898
1898
 
1899
1899
  funcs.getMediaFile(media.media_file_id, media.media_filename, media.media_ext, thumbnail_id, thumbnail_config, function(err, thumbnail_srcpath, thumbnail_fname, stat){
1900
1900
  if(err) return thumbnail_cb('Error getting thumbnail for '+media_fpath+':'+thumbnail_id+' - '+err.toString());
@@ -303,7 +303,7 @@ module.exports = exports = function(module, funcs){
303
303
 
304
304
  //Get image width / height
305
305
  function(cb){
306
- if(!_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], media_ext)) return cb();
306
+ if(!_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], media_ext)) return cb();
307
307
  jsh.Extensions.image.size(tmp_file_path, function(err, size){
308
308
  if(err || !size || !size.width || !size.height) return cb();
309
309
  media_width = size.width;
@@ -636,7 +636,7 @@ module.exports = exports = function(module, funcs){
636
636
 
637
637
  //Get image width / height
638
638
  function(media_cb){
639
- if(!_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.svg'], media_ext)) return media_cb();
639
+ if(!_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.svg'], media_ext)) return media_cb();
640
640
  jsh.Extensions.image.size(tmp_file_path, function(err, size){
641
641
  if(err || !size || !size.width || !size.height) return media_cb();
642
642
  media_width = size.width;
package/models/js/site.js CHANGED
@@ -113,7 +113,7 @@
113
113
  var qs = '';
114
114
  if(media_id) qs = 'media_id='+media_id;
115
115
  else if(media_file_id) qs = 'media_file_id='+media_file_id;
116
- if(_.includes(['.jpg','.jpeg','.tif','.tiff','.png','.gif','.pdf','.svg'], media_ext.toLowerCase())){
116
+ if(_.includes(['.jpg','.jpeg','.webp','.tif','.tiff','.png','.gif','.pdf','.svg'], media_ext.toLowerCase())){
117
117
  let url = jsh._BASEURL+'_funcs/media/'+media_key+'/'+(qs?'?'+qs:'');
118
118
  var ww = 800;
119
119
  var wh = 600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsharmony-cms",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "jsHarmony CMS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "diff2html": "3.4.1",
31
31
  "ejs": "2.7.4",
32
32
  "js-beautify": "^1.11.0",
33
- "jsharmony": "^1.5.2",
33
+ "jsharmony": "^1.40.15",
34
34
  "jsharmony-factory": "^1.2.0",
35
35
  "lodash": "^4.17.19",
36
36
  "node-forge": "^0.10.0",