summaryrefslogtreecommitdiff
blob: d90e965bc62b449733b1debb5edea466f2a123d9 (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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*****************************************************************************************************/
/*                                                                                                   */
/*                                    	'THEMES GALLERY'		                                     */
/*                                                                                                   */
/*****************************************************************************************************/

function WMP_THEMES_GALLERY(){

    var JSObject = this;

    this.type = "wmp_themes";

    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 SNAPSHOTS ARRAY                                        */
    /*                                                                                                   */
    /*****************************************************************************************************/

    this.initSnapshots = function(){

        var snapshots = {

            'app1' : [
                {
                    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'
                }
            ],

            'app2': [
                {
                    src: WMPJSInterface.localpath + 'admin/images/app2/1-preview-cover.png',
                    title: 'Home page cover'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app2/2-preview-categories.png',
                    title: 'View posts'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app2/3-preview-menu.png',
                    title: 'Categories menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app2/4-preview-article.png',
                    title: 'Post details'
                }
            ],

            'app3': [
                {
                    src: WMPJSInterface.localpath + 'admin/images/app3/1-preview-cover.png',
                    title: 'Home page cover'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app3/2-preview-categories.png',
                    title: 'Categories menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app3/3-preview-menu.png',
                    title: 'View posts'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app3/4-preview-article.png',
                    title: 'Post details'
                }
            ],

            'app4': [
                {
                    src: WMPJSInterface.localpath + 'admin/images/app4/1-homepage.png',
                    title: 'View posts'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app4/2-menu-opened.png',
                    title: 'Menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app4/3-categories-opened.png',
                    title: 'Categories menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app4/4-others-opened.png',
                    title: 'Other options menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app4/5-article-details.png',
                    title: 'Article details'
                }
            ],

            'app5' : [
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/1-preview-homepage.png',
                    title: 'Home page'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/2-preview-articles.png',
                    title: 'View posts'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/3-preview-menu.png',
                    title: 'Menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/4-preview-menu-categories.png',
                    title: 'Categories menu'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/5-preview-article-details.png',
                    title: 'Article details'
                },
                {
                    src: WMPJSInterface.localpath + 'admin/images/app5/6-preview-article-details-menu.png',
                    title: 'Share article'
                }
            ]
        }

        return snapshots;

    }
    
     /*****************************************************************************************************/
    /*                                                                                                   */
    /*                                  FUNCTION INIT GALLERIES                                          */
    /*                                                                                                   */
    /*****************************************************************************************************/
    this.initThemesGalleries = function(){

        var snapshots = this.initSnapshots();

        for (var i = 1; i <= 5; i++) {

            jQuery('#' + this.type + '_preview_' + String(i)).magnificPopup({
                items: snapshots['app' + String(i)],
                gallery: {
                    enabled: true
                },
                type: 'image' // this is default type
            });
        }
    }
}