summaryrefslogtreecommitdiff
blob: 107a2cf3c887a7d5f5527bcb64ffd416aabd8e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*****************************************************************************************************/
/*                                                                                                   */
/*                                    	'EDIT DISPLAY MODE'		                                     */
/*                                                                                                   */
/*****************************************************************************************************/

function WMP_THEMES_GALLERY(){

    var JSObject = this;

    this.type = "wmp_themes_gallery";

    this.DOMDoc;
    this.baseThemeUrl;
	
    /*****************************************************************************************************/
    /*                                                                                                   */
    /*                              FUNCTION INIT - called from WMPJSInterface                           */
    /*                                                                                                   */
    /*****************************************************************************************************/
    this.init = function(){
        
        // save a reference to WMPJSInterface Object
        WMPJSInterface = window.parent.WMPJSInterface;
        
        this.initThemesGalleries();
    }
    
     /*****************************************************************************************************/
    /*                                                                                                   */
    /*                                  FUNCTION INIT GALLERIES                                          */
    /*                                                                                                   */
    /*****************************************************************************************************/
    this.initThemesGalleries = function(){
        
        jQuery('#'+this.type+'_base').magnificPopup({
            items: [
              {
                src: JSObject.baseThemeUrl + '/snapshots/1-preview-phone-cover.png',
                title: 'Home page cover'
              },
              {
                src: JSObject.baseThemeUrl + '/snapshots/2-preview-phone-categories.png',
                title: 'View posts'
              },
              {
                src: JSObject.baseThemeUrl + '/snapshots/3-preview-phone-menu.png',
                title: 'Categories menu'
              },
              {
                src: JSObject.baseThemeUrl + '/snapshots/4-preview-phone-article.png',
                title: 'Post details'
              },
              {
                src: JSObject.baseThemeUrl + '/snapshots/5-preview-phone-comments.png',
                title: 'Post comments'
              }
            ],
            gallery: {
              enabled: true
            },
            type: 'image' // this is default type
        });
        
        jQuery('#'+this.type+'_business').magnificPopup({
            items: [
              {
                src: WMPJSInterface.localpath + '/admin/images/businesstheme/1-preview-phone-cover.png',
                title: 'Home page cover'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/businesstheme/2-preview-phone-categories.png',
                title: 'View posts'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/businesstheme/3-preview-phone-menu.png',
                title: 'Categories menu'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/businesstheme/4-preview-phone-article.png',
                title: 'Post details'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/businesstheme/5-preview-phone-social.png',
                title: 'Social media menu for a post'
              }
            ],
            gallery: {
              enabled: true
            },
            type: 'image' // this is default type
        });
        
        jQuery('#'+this.type+'_lifestyle').magnificPopup({
            items: [
              {
                src: WMPJSInterface.localpath + '/admin/images/lifestyletheme/1-preview-phone-cover.png',
                title: 'Home page cover'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/lifestyletheme/2-preview-phone-categories.png',
                title: 'View posts'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/lifestyletheme/3-preview-phone-menu.png',
                title: 'Side menu'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/lifestyletheme/4-preview-phone-article.png',
                title: 'Post details'
              },
              {
                src: WMPJSInterface.localpath + '/admin/images/lifestyletheme/5-preview-phone-social.png',
                title: 'Social media menu for a post'
              }
            ],
            gallery: {
              enabled: true
            },
            type: 'image' // this is default type
        });
    }
}