2010-09-04 16:36:25 +02:00
|
|
|
/*
|
|
|
|
|
* To change this template, choose Tools | Templates
|
|
|
|
|
* and open the template in the editor.
|
|
|
|
|
*/
|
|
|
|
|
|
2010-09-05 16:41:28 +02:00
|
|
|
var debug = true;
|
2010-09-06 14:34:04 +02:00
|
|
|
var state = null;
|
2010-09-17 15:13:53 +02:00
|
|
|
|
|
|
|
|
// functions called after login
|
2010-09-09 18:35:54 +02:00
|
|
|
var authCallbacks = [];
|
2010-09-06 14:34:04 +02:00
|
|
|
|
2010-09-17 15:13:53 +02:00
|
|
|
// config form panels
|
|
|
|
|
var repositoryConfigPanels = [];
|
|
|
|
|
|
2010-09-17 15:31:19 +02:00
|
|
|
function registerConfigPanel(panel){
|
|
|
|
|
repositoryConfigPanels.push( panel );
|
|
|
|
|
}
|
|
|
|
|
|
2010-09-06 14:34:04 +02:00
|
|
|
var repositoryTypeStore = new Ext.data.JsonStore({
|
2010-09-04 16:36:25 +02:00
|
|
|
id: 1,
|
2010-09-06 14:34:04 +02:00
|
|
|
fields: [ 'displayName', 'name' ]
|
2010-09-04 16:36:25 +02:00
|
|
|
});
|
2010-09-04 17:05:27 +02:00
|
|
|
|
2010-09-09 18:35:54 +02:00
|
|
|
var restUrl = "api/rest/";
|
|
|
|
|
|
|
|
|
|
function loadState(s){
|
|
|
|
|
state = s;
|
|
|
|
|
console.debug( s );
|
|
|
|
|
repositoryTypeStore.loadData(state.repositoryTypes);
|
|
|
|
|
Ext.each(authCallbacks, function(callback){
|
|
|
|
|
if ( Ext.isFunction(callback) ){
|
|
|
|
|
callback(state);
|
|
|
|
|
}
|
|
|
|
|
});
|
2010-09-17 15:13:53 +02:00
|
|
|
}
|