Plugin Directory

Changeset 2029975


Ignore:
Timestamp:
02/13/2019 02:48:23 PM (7 years ago)
Author:
kranthitech
Message:

Added API Key for Connecting with Yeloni Web Services

Location:
yeloni-free-exit-popup/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • yeloni-free-exit-popup/trunk/admin-interface/dist/admin.min.js

    r2027421 r2029975  
    526526                controller: 'widgetTypeController'
    527527            })
    528 
    529528            .state('build.select', {
    530529                url: '/select',
     
    541540                templateUrl: yetience.adminPath + '/src/partials/build.integrate.html',
    542541                controller: 'buildIntegrateController'
     542            })
     543            .state('build.apikey', {
     544                url: '/apikey',
     545                templateUrl: yetience.adminPath + '/src/partials/build.apikey.html',
     546                controller: 'buildAPIKeyController'
    543547            })
    544548            .state('extensions', {
     
    23682372
    23692373angular.module('yetienceApp')
     2374    .controller('buildAPIKeyController', ['$scope', 'SettingsService', '$state', '$rootScope', '$stateParams', '$location', 'WidgetUpdate', 'localStorageService', 'UtilsService', function ($scope, SettingsService, $state, $rootScope, $stateParams, $location, WidgetUpdate, localStorageService, UtilsService) {
     2375        //console.log('INSIDE BUIlD APIKEY CONTROLLER')
     2376
     2377        $scope.SS = SettingsService
     2378
     2379
     2380        $scope.submitCode = function (apikey) {
     2381            if (apikey.trim() == SettingsService.setup().id) {
     2382                //WidgetUpdate.operations.saveTemplate()
     2383                console.log('widget is ', $scope.widget)
     2384                WidgetUpdate.savePopup($scope.widget)
     2385            } else {
     2386                alert('Invalid API Key')
     2387            }
     2388        }
     2389    }])
     2390angular.module('yetienceApp')
    23702391    .directive('tag', [function() {
    23712392        // Runs during compile
     
    47174738                show: true,
    47184739                title: function (widget) {
     4740                    return (firstWidget()) ? 'Generate API Key' : 'Save my Design'
     4741
    47194742                    /*
    47204743                        If email subscription theme, then button title is 'Integrate'
    47214744                        Otherwise, button title is 'Save my Design'
    47224745                    */
    4723                     if (isEmailPopup(widget)) {
    4724                         return 'Autoresponse'
    4725                     } else {
    4726                         return 'Save my Design'
    4727                     }
     4746                    // // if (isEmailPopup(widget)) {
     4747                    // //     return 'Autoresponse'
     4748                    // // } else {
     4749                    // return 'Save my Design'
     4750                    // //}
    47284751                },
    47294752                tabTitle: 'Customize',
     
    47354758                    //if it's an email widget, don't save
    47364759
    4737                     if (isEmailPopup(widget)) {
    4738                         return false
    4739                     } else {
    4740                         return true
    4741                     }
    4742                 }
    4743             },
    4744             integrate: {
     4760                    // if (isEmailPopup(widget)) {
     4761                    //     return false
     4762                    // } else {
     4763                    //return true
     4764                    // }
     4765                    return !firstWidget()
     4766                }
     4767            },
     4768            apikey: {
    47454769                show: false,
    4746                 title: 'Save Popup',
    4747                 operation: 'saveEmailTemplate',
    4748                 tabTitle: 'Autoresponse',
    4749                 create: function (widget) {
    4750                     //if email sub widget - retur
    4751                     if (widget) {
    4752                         $rootScope.isEmailTheme = ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
    4753                         return ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
    4754                     } else {
    4755                         $rootScope.isEmailTheme = false
    4756                         return false
    4757                     }
     4770                tabTitle: 'Generate API Key',
     4771                title: 'Save my Design',
     4772                create: function () {
     4773                    //show this only if no widget has been created yet
     4774                    return SettingsService.setup().widgets.length == 0
    47584775                },
    4759                 edit: function (widget) {
    4760                     //if email sub widget - retur
    4761                     if (widget) {
    4762                         return ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
    4763                     } else {
    4764                         return false
    4765                     }
    4766                 },
    4767                 saveOnCompletion: true
    4768             }
     4776                edit: false,
     4777                saveOnCompletion: true,
     4778                operation: 'saveAPIKey'
     4779            }
     4780            /*,
     4781                        integrate: {
     4782                            show: false,
     4783                            title: 'Save Popup',
     4784                            operation: 'saveEmailTemplate',
     4785                            tabTitle: 'Autoresponse',
     4786                            create: function (widget) {
     4787                                //if email sub widget - retur
     4788                                if (widget) {
     4789                                    $rootScope.isEmailTheme = ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
     4790                                    return ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
     4791                                } else {
     4792                                    $rootScope.isEmailTheme = false
     4793                                    return false
     4794                                }
     4795                            },
     4796                            edit: function (widget) {
     4797                                //if email sub widget - retur
     4798                                if (widget) {
     4799                                    return ($rootScope.themes[widget.theme].categories.indexOf('subscribe') >= 0)
     4800                                } else {
     4801                                    return false
     4802                                }
     4803                            },
     4804                            saveOnCompletion: true
     4805                        }*/
     4806
    47694807            /*,
    47704808                        launch: {
     
    47974835            "build.placement": "build.select",
    47984836            "build.select": "build.design",
    4799             "build.design": "build.integrate"
     4837            "build.design": "build.apikey"
     4838            //"build.design": "build.integrate"
    48004839
    48014840            //before we had goals
     
    48954934        }
    48964935
     4936        this.operations = operations
     4937
    48974938        function getWidget() {
    48984939            var html = document.getElementById('widget-design').innerHTML
     
    49304971        }
    49314972
     4973        this.savePopup = savePopup
     4974
    49324975        this.isEmailPopup = isEmailPopup
     4976        this.firstWidget = firstWidget
     4977
     4978        function firstWidget() {
     4979            return SettingsService.setup().widgets.length == 0
     4980        }
    49334981
    49344982        function isEmailPopup(widget) {
  • yeloni-free-exit-popup/trunk/admin-interface/loader/admin_dev.json

    r1927011 r2029975  
    99    }, {
    1010        "base": "/src/scripts/controllers",
    11         "items": ["gopremium", "list", "main", "start", "auth.form", "build", "build.business.goal", "build.widget.type", "build.select", "build.design", "build.configure", "build.activate", "build.launch", "build.launch.statistics", "build.integrate", "build.launch.package", "email.list", "extension.sale", "modal.feedback", "affiliate"],
     11        "items": ["gopremium", "list", "main", "start", "auth.form", "build", "build.business.goal", "build.widget.type", "build.select", "build.design", "build.configure", "build.activate", "build.launch", "build.launch.statistics", "build.integrate", "build.launch.package", "email.list", "extension.sale", "modal.feedback", "affiliate", "build.apikey"],
    1212        "suffix": ".controller"
    1313    }, {
  • yeloni-free-exit-popup/trunk/admin-interface/src/partials/build.html

    r1776621 r2029975  
    1717            </a>
    1818        </li>
    19         <button class="btn btn-primary pull-right btn-disabled" ng-disabled="disableSave()" ng-show="W.states[W.current.state].title && W.compute(W.states[W.current.state],'show') && !W.current.working" ng-click="W.nextFunction(widget,customer)">
     19        <button class="btn btn-primary pull-right btn-disabled" ng-disabled="disableSave()" ng-show="W.states[W.current.state].title && W.compute(W.states[W.current.state],'show') && !W.current.working"
     20            ng-click="W.nextFunction(widget,customer)">
    2021            <span>Next: {{W.compute(W.states[W.current.state],'title',widget)}} &#8594</span>
    2122        </button>
  • yeloni-free-exit-popup/trunk/admin-interface/src/partials/list.html

    r2007742 r2029975  
    9999            </div>
    100100
    101             <div class="checkbox" class="add-yel-badge" ng-click="WU.changePoweredBy()" ng-show="!R.SETUP.poweredBy||R.SETUP.customPoweredBy">
     101            <!-- <div class="checkbox" class="add-yel-badge" ng-click="WU.changePoweredBy()" ng-show="!R.SETUP.poweredBy||R.SETUP.customPoweredBy">
    102102                <label><input class="form-control" ng-model="R.SETUP.poweredBy" type="checkbox">
    103103                    Add Yeloni Badge
    104104                </label>
    105             </div>
     105            </div> -->
    106106
    107107        </div>
  • yeloni-free-exit-popup/trunk/client/dist/client.min.js

    r2027421 r2029975  
    807807    })
    808808
     809    Autience.lifecycle.render.push(function (widget) {
     810        var extensions = Autience.utils.nestedValue(Autience, ['setup', 'extensions'])
     811        if (!extensions || Object.keys(extensions).length == 0) {
     812            return
     813        }
     814
     815        if (widget.goalType != 'subscribe') {
     816            return
     817        }
     818        if (document.getElementsByClassName('logged-in').length > 0) {
     819            return
     820        }
     821
     822        var widget_element = document.getElementById(widget.code)
     823        var poweredBy = document.createElement('div')
     824        var url = 'https://convertiply.com'
     825        url = url + '?utm_source=' + window.location.hostname + '&utm_campaign=poweredby'
     826        poweredBy.innerHTML = "<a href='" + url + "' target='_blank'>Get an <b>Email Optin</b> for your Website</a>"
     827        var style = poweredBy.style,
     828            astyle = poweredBy.getElementsByTagName('a')[0].style
     829        Object.assign(style, {
     830            color: 'white',
     831            fontSize: '15px',
     832            fontFamily: 'arial',
     833            textAlign: 'center'
     834        })
     835        Object.assign(astyle, {
     836            color: 'white'
     837        })
     838        widget_element.appendChild(poweredBy)
     839    })
    809840    /*
    810841    //showing the affiliate link if applicable
  • yeloni-free-exit-popup/trunk/wordpress/admin-wordpress.js

    r1776621 r2029975  
    11//this file has functions to read from the wp-config setting textbox
    22
    3 window.defineAdminYetience = function() {
    4     yetience.loadApp(yetience.path + "/admin-interface", function() {
     3window.defineAdminYetience = function () {
     4    yetience.loadApp(yetience.path + "/admin-interface", function () {
    55        //console.log('Scripts and styles loaded in ' + (Date.now() - autience_initiated_at) + ' milliseconds')
    6         angular.element(document).ready(function() {
     6        angular.element(document).ready(function () {
    77            angular.bootstrap(document, ['yetienceApp'])
    88
     
    1414
    1515    yetience.website_saved = false
    16     yetience.readFromPlatform = function() {
     16    yetience.readFromPlatform = function () {
    1717        var encoded_setup = yetience.encoded_setup //document.getElementById('yetience_setup').value
    1818        if (encoded_setup && encoded_setup.length > 1) {
     
    2323        } else {
    2424            return {
     25                need_api_key: true,
    2526                widgets: []
    2627            }
     
    2930
    3031
    31     yetience.saveToPlatform = function(setup, message, label, disable_undo) {
     32    yetience.saveToPlatform = function (setup, message, label, disable_undo) {
    3233        //if (!yetience.isCyclic(setup)) {
    3334        document.getElementById('yetience_setup').value = window.btoa(encodeURIComponent(JSON.stringify(setup)))
     
    4142        document.getElementById('yetience_submit_button').getElementsByTagName('input')[0].value = label
    4243        yetience.readyToSave()
    43             //}
     44        //}
    4445
    4546    }
    4647
    47     yetience.readyToSave = function() {
     48    yetience.readyToSave = function () {
    4849        document.getElementById("yetience_submit_button").style.display = 'block'
    4950
     
    5253    }
    5354
    54     yetience.isCyclic = function(obj) {
     55    yetience.isCyclic = function (obj) {
    5556        var seenObjects = [];
    5657
  • yeloni-free-exit-popup/trunk/yetience-plugin.php

    r2027421 r2029975  
    44Plugin URI: #
    55Description: Exit Popups are the best way to engage visitors leaving your website. Show offers, social buttons, email signup forms or customize it as you like.
    6 Version: 9.0.1
     6Version: 9.0.2
    77Author: Jayasri Nagrale
    88Author URI: http://www.yeloni.com
Note: See TracChangeset for help on using the changeset viewer.