Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
arikaim-repository committed Mar 14, 2020
1 parent 9801db1 commit 3d446ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 5 additions & 2 deletions image/modal/modal.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<div class="ui modal image-preview-modal {{ class }}" id="image_preview_modal">
<div class="header {{ header_class }}">
{% if hidde_title != true %}
<i class="close icon"></i>
<div class="header {{ header_class }}" id="image_modal_header">
<i class="image-modal-icon icon blue large image outline {{ dialogs.confirm.icon }}"></i>
<span class="image-modal-title">{{ labels.title }}</span>
</div>
<div class="image content image-modal-description" id="image_modal_content">
{% endif %}
<div class="content image-modal-description" id="image_modal_content">
<img class="image rounded bordered" data-src="" id="image_preview">
</div>
<div class="actions">
Expand Down
8 changes: 6 additions & 2 deletions image/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function ImagePreviewModal() {
var description = getValue('description',options,null);
var images = getValue('images',options,[]);
var icon = getValue('icon',options,null);
var hideIcon = getValue('hideIcon',options,null);
var hideIcon = getValue('hideIcon',options,false);
var hideTitle = getValue('hideTitle',options,true);

images.forEach(function(item) {
console.log(item);
Expand All @@ -36,9 +37,12 @@ function ImagePreviewModal() {
if (isEmpty(icon) == false) {
$('#' + modalId + ' .image-modal-icon').attr('class','icon modal-icon ' + icon);
}
if (isEmpty(hideIcon) == false) {
if (hideIcon == true) {
$('#' + modalId + ' .image-modal-icon').hide();
}
if (hideTitle == true) {
$('#image_modal_header').hide();
}
// show modal
$('#' + modalId).modal({}).modal('show');
// load images
Expand Down
8 changes: 6 additions & 2 deletions policy/cookie/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @license http://www.arikaim.com/license
* http://www.arikaim.com
*/
"use strict";
'use strict';

function CookieDialog() {
var self = this;
Expand All @@ -13,6 +13,10 @@ function CookieDialog() {
this.interval = getValue('interval',options,$('#cookie_policy_modal').attr('interval'));
var position = getValue('position',options,'bottom right');

if (isEmpty(this.interval) == true) {
this.interval = 7;
}

if (this.isApproved() == true) return;

if (type == 'dialog') {
Expand Down Expand Up @@ -41,7 +45,7 @@ function CookieDialog() {
};

this.setApproved = function(interval) {
interval = getDefaultValue(interval,this.interval);
interval = getDefaultValue(interval,this.interval);
arikaim.storage.setCookie('privacy-policy',1,interval);
};

Expand Down

0 comments on commit 3d446ec

Please sign in to comment.