can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r19562: LJSUP-9366: Change Interstitial dialog f...

Committer: dpetrov
LJSUP-9366: Change Interstitial dialog for Singapore
U   trunk/htdocs/js/ljwidget_ippu.js
Modified: trunk/htdocs/js/ljwidget_ippu.js
===================================================================
--- trunk/htdocs/js/ljwidget_ippu.js	2011-08-02 08:04:11 UTC (rev 19561)
+++ trunk/htdocs/js/ljwidget_ippu.js	2011-08-02 08:42:25 UTC (rev 19562)
@@ -1,9 +1,9 @@
 LJWidgetIPPU = new Class(LJWidget, {
     init: function (opts, reqParams) {
-        var title = opts.title;
-        var widgetClass = opts.widgetClass;
-        var authToken = opts.authToken;
-        var nearEle = opts.nearElement;
+        var title          = opts.title;
+        var widgetClass    = opts.widgetClass;
+        var authToken      = opts.authToken;
+        var nearEle        = opts.nearElement;
         var not_view_close = opts.not_view_close;
 
         if (! reqParams) reqParams = {};
@@ -50,13 +50,20 @@
         var widgetArgs = [c.id, widgetClass, authToken]
         LJWidgetIPPU.superClass.init.apply(this, widgetArgs);
 
+        var self = this;
+        ippu.setCancelledCallback( function() {
+            if( self.cancel ) {
+                self.cancel();
+            }
+        } );
+
         if (!widgetClass)
             return null;
 
         this.widgetClass = widgetClass;
-        this.authToken = authToken;
-        this.title = title;
-        this.nearEle = nearEle;
+        this.authToken   = authToken;
+        this.title       = title;
+        this.nearEle     = nearEle;
 
         window.setInterval(this.animateLoading.bind(this), 20);
 
@@ -92,10 +99,10 @@
     doAjaxRequest: function (params) {
       if (! params) params = {};
       params['_widget_ippu'] = 1;
-      if(document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self")){
-      	params['Widget[IPPU_SettingProd]_LJ__Setting__InvisibilityGuests_invisibleguests']=
-	      (document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self").checked==true)?(1):((document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_anon").checked==true)?(2):(0))
-      }
+     if(document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self")){
+       params['Widget[IPPU_SettingProd]_LJ__Setting__InvisibilityGuests_invisibleguests']=
+         (document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_self").checked==true)?(1):((document.getElementById("LJ__Setting__InvisibilityGuests_invisibleguests_anon").checked==true)?(2):(0))
+     }
       LJWidgetIPPU.superClass.doAjaxRequest.apply(this, [params]);
     },
 

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments