Commits

Shlomi Fish  committed d51f30f

Convert to methods.

  • Participants
  • Parent commits 1d19459

Comments (0)

Files changed (1)

File fc-solve/site/wml/src/js/web-fc-solve-ui.js

     return;
 }
 
-function _get_loc() {
-    return window.location;
-}
-
-function _get_base_url() {
-    var loc = _get_loc();
-    return loc.protocol + '//' + loc.host + loc.pathname;
-}
 
 Class('FC_Solve_Bookmarking', {
         has: {
             },
         },
         methods: {
+            _get_loc: function() {
+                return window.location;
+            },
+            _get_base_url: function () {
+                var that = this;
+
+                var loc = that._get_loc();
+                return loc.protocol + '//' + loc.host + loc.pathname;
+            },
             _each_control: function(cb) {
                 var that = this;
 
                     control_values[myid] = get_v(myid);
                 });
 
-                var bookmark_string = _get_base_url() + '?' + $.querystring(control_values);
+                var bookmark_string = that._get_base_url() + '?' + $.querystring(control_values);
 
                 $("#fcs_bm_results_input").val(bookmark_string);
 
             restore_bookmark: function () {
                 var that = this;
 
-                var qs = _get_loc().search;
+                var qs = that._get_loc().search;
 
                 if (! qs.length) {
                     return;