Update window.location assignment to use href property
authorColeman Watts <coleman@civicrm.org>
Wed, 19 Mar 2014 16:44:49 +0000 (12:44 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 19 Mar 2014 16:44:49 +0000 (12:44 -0400)
templates/CRM/Case/Audit/Audit.tpl
templates/CRM/Case/Form/CaseView.js
templates/CRM/Contact/Form/Edit/Lock.tpl
templates/CRM/Contribute/Form/ContributionCharts.tpl
templates/CRM/Profile/Form/Dynamic.tpl
templates/CRM/Queue/Page/Runner.tpl
templates/CRM/SMS/Form/Provider.tpl
templates/CRM/common/redirectJS.tpl

index 0dc42663aa80237f1060e172ea9ef2a382777630..fa4d48b3fd013b2e0a79f92ed9144696a23efeb4 100644 (file)
@@ -176,7 +176,7 @@ There's the potential for collisions (two different labels having the same short
           dataUrl     = dataUrl + '&cid={/literal}{$clientID}{literal}'+'&selectedChild=case';
        }
 
-       window.location =  dataUrl;
+       window.location.href =  dataUrl;
 }
 </script>
 {/literal}
index 751e6ea7eef71ede9c28f1967bcfd4d7e058663d..d4cb47923348b2d595c970370e1c75549013b5c5 100644 (file)
@@ -10,7 +10,7 @@
       CRM.loadForm(url).on('crmFormSuccess', refresh);
     }
     else {
-      window.location = url;
+      window.location.href = url;
     }
   }
 
index ff9bb72221818c4bff0d50753356a384b5085bed..a8807e50faf5ee4194e394f2226e20bf106d72d6 100644 (file)
@@ -20,7 +20,7 @@ cj(function() {
   cj('<button>')
     .text("{/literal}{ts}Reload Page{/ts}{literal}")
     .click(function() {
-      window.location = CRM.url('civicrm/contact/add', {
+      window.location.href = CRM.url('civicrm/contact/add', {
         reset: 1,
         action: 'update',
         cid: {/literal}{$contactId}{literal}
@@ -31,4 +31,4 @@ cj(function() {
     ;
 });
 </script>
-{/literal}
\ No newline at end of file
+{/literal}
index fd122d4f8b65d5e5f9684513566b625a24032761..5a577754802f54e021be6cb502274696cc76fd36 100644 (file)
   function byMonthOnClick( barIndex ) {
      var allData = {/literal}{$openFlashChartData}{literal};
      var url     = eval( "allData.by_month.on_click_urls.url_" + barIndex );
-     if ( url ) window.location = url;
+     if ( url ) window.location.href = url;
   }
 
   function byYearOnClick( barIndex ) {
      var allData = {/literal}{$openFlashChartData}{literal};
      var url     = eval( "allData.by_year.on_click_urls.url_" + barIndex );
-     if ( url ) window.location = url;
+     if ( url ) window.location.href = url;
   }
 
  </script>
index 67fcf6e42350451b6ac9468e4ed5f6048b9b64b4..412813020753cc42185a02239e942f37ce9189a9 100644 (file)
@@ -46,7 +46,7 @@ function checkResponse(responseText, statusText, xhr, $form) {
   //if there is any form error show the dialog
   //else redirect to post url
   if (!cj(responseText).find('.crm-error').html()) {
-    window.location = '{/literal}{$postUrl}{literal}';
+    window.location.href = '{/literal}{$postUrl}{literal}';
   }
 } 
 </script>
index b0b14e35edb62d5ed328b3c8aa7c4b599cb89348..edaa4758ca4aca6cd0725e378930453b21a6e6d0 100644 (file)
@@ -23,7 +23,7 @@ cj(function() {
 
   var displayResponseData = function(data, textStatus, jqXHR) {
     if (data.redirect_url) {
-      window.location = data.redirect_url;
+      window.location.href = data.redirect_url;
       return;
     }
     
@@ -143,4 +143,4 @@ cj(function() {
 });
 
 </script>
-{/literal}
\ No newline at end of file
+{/literal}
index b4437ed2a6587cc322cf14fa2faf4844af909234..e48012d710b2d71df7e0aa75cdc1bde5a45500a1 100644 (file)
@@ -82,7 +82,7 @@
         var url = {/literal}"{$refreshURL}"{literal}
         var post = url + "&key=" + provider.value;
         if( refresh ) {
-            window.location = post; 
+            window.location.href = post;
         }
     }
 {/literal}
index 350f81fa65bb990d0221fc887ce46157ecd56b44..0dac59a7c8376ebb7e8f7964965adeda26b9c9cb 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <head>
 <script type="text/javascript">
-  window.location = "{$redirectURL}"
+  window.location.href = "{$redirectURL}"
 </script>
 <title>{$title}</title>
 </head>
@@ -11,4 +11,4 @@
 {$message}
 </p>
 </body>
-</html>
\ No newline at end of file
+</html>