Subversion Repositories DevTools

Rev

Rev 5116 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5116 Rev 5117
Line 107... Line 107...
107
            function load_page_from_hash(mode) {
107
            function load_page_from_hash(mode) {
108
                if (typeof mode === 'object') mode = 'Indirect';
108
                if (typeof mode === 'object') mode = 'Indirect';
109
                var hash = window.location.hash;
109
                var hash = window.location.hash;
110
                if (hash.charAt(0) == '#')
110
                if (hash.charAt(0) == '#')
111
                {
111
                {
112
                    console.log( mode + ":" + hash );
-
 
113
                    hash = hash.substr(1) ;
112
                    hash = hash.substr(1) ;
114
                    var locationData = $.deserialize(hash);
113
                    var locationData = $.deserialize(hash);
115
                    load_page_body(locationData.url, locationData );
114
                    load_page_body(locationData.url, locationData );
116
                }
115
                }
117
            }
116
            }
Line 158... Line 157...
158
    var persist = {
157
    var persist = {
159
        rtag_id : <%=DB_RTAG_ID%>,
158
        rtag_id : <%=DB_RTAG_ID%>,
160
        proj_id : <%=DB_PROJ_ID%>,
159
        proj_id : <%=DB_PROJ_ID%>,
161
        pv_id : <%=DB_PV_ID%>
160
        pv_id : <%=DB_PV_ID%>
162
    };
161
    };
163
    $('#sdk_version').off();
-
 
164
    $('#sdk_version').empty();
-
 
165
    $('#sdk_version').load(url, $.extend({}, data, persist));
-
 
166
 
162
 
167
    //  Reflect the current page load in the URL
163
    //  Reflect the current page load in the URL
168
    //      Shows what we are doing
164
    //      Shows what we are doing
169
    //      Allows page reload to work
165
    //      Allows page reload to work
170
    //      Allows browser history to work
166
    //      Allows browser history to work
171
    
-
 
172
    var newdata = {};
167
    var newdata = {};
173
    newdata['url'] = url;
168
    newdata['url'] = url;
174
    if ( typeof(data) !== 'undefined' ){
169
    if ( typeof(data) !== 'undefined' ){
175
        for (var key in data) {
170
        for (var key in data) {
176
            newdata[key] = (data[key]);
171
            newdata[key] = (data[key]);
177
        }
172
        }
178
    }
173
    }
-
 
174
 
-
 
175
    //  Prevent duplicates caused by changing window.location.hash
-
 
176
    //
179
    window.location.hash = jQuery.param(newdata);
177
    var newHash = jQuery.param(newdata);
-
 
178
    if ( newHash !== load_page_body.last ) {
-
 
179
        $('#sdk_version').off();
-
 
180
        $('#sdk_version').empty();
-
 
181
        $('#sdk_version').load(url, $.extend({}, data, persist));
-
 
182
 
-
 
183
        load_page_body.last = newHash;
-
 
184
        window.location.hash = newHash;
-
 
185
   }
180
}
186
}
181
        </script>
187
        </script>
182
      <!-- DROPDOWN MENUS -->
188
      <!-- DROPDOWN MENUS -->
183
   </head>
189
   </head>
184
   <body>
190
   <body>