X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..HEAD:/docs/resources/docs.js
diff --git a/docs/resources/docs.js b/docs/resources/docs.js
deleted file mode 100644
index b0483de5..00000000
--- a/docs/resources/docs.js
+++ /dev/null
@@ -1,671 +0,0 @@
-Ext.BLANK_IMAGE_URL = 'resources/s.gif';
-
-Docs = {};
-
-ApiPanel = function() {
- ApiPanel.superclass.constructor.call(this, {
- id:'api-tree',
- region:'west',
- split:true,
- width: 280,
- minSize: 175,
- maxSize: 500,
- collapsible: true,
- margins:'0 0 5 5',
- cmargins:'0 0 0 0',
- rootVisible:false,
- lines:false,
- autoScroll:true,
- animCollapse:false,
- animate: false,
- collapseMode:'mini',
- loader: new Ext.tree.TreeLoader({
- preloadChildren: true,
- clearOnLoad: false
- }),
- root: new Ext.tree.AsyncTreeNode({
- text:'Ext JS',
- id:'root',
- expanded:true,
- children:[Docs.classData]
- }),
- collapseFirst:false
- });
- // no longer needed!
- //new Ext.tree.TreeSorter(this, {folderSort:true,leafAttr:'isClass'});
-
- this.getSelectionModel().on('beforeselect', function(sm, node){
- return node.isLeaf();
- });
-};
-
-Ext.extend(ApiPanel, Ext.tree.TreePanel, {
- selectClass : function(cls){
- if(cls){
- var parts = cls.split('.');
- var last = parts.length-1;
- var res = [];
- var pkg = [];
- for(var i = 0; i < last; i++){ // things get nasty - static classes can have .
- var p = parts[i];
- var fc = p.charAt(0);
- var staticCls = fc.toUpperCase() == fc;
- if(p == 'Ext' || !staticCls){
- pkg.push(p);
- res[i] = 'pkg-'+pkg.join('.');
- }else if(staticCls){
- --last;
- res.splice(i, 1);
- }
- }
- res[last] = cls;
-
- this.selectPath('/root/apidocs/'+res.join('/'));
- }
- }
-});
-
-
-DocPanel = Ext.extend(Ext.Panel, {
- closable: true,
- autoScroll:true,
-
- initComponent : function(){
- var ps = this.cclass.split('.');
- this.title = ps[ps.length-1];
-
- DocPanel.superclass.initComponent.call(this);
- },
-
- scrollToMember : function(member){
- var el = Ext.fly(this.cclass + '-' + member);
- if(el){
- var top = (el.getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
- this.body.scrollTo('top', top-25, {duration:.75, callback: this.hlMember.createDelegate(this, [member])});
- }
- },
-
- scrollToSection : function(id){
- var el = Ext.getDom(id);
- if(el){
- var top = (Ext.fly(el).getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
- this.body.scrollTo('top', top-25, {duration:.5, callback: function(){
- Ext.fly(el).next('h2').pause(.2).highlight('#8DB2E3', {attr:'color'});
- }});
- }
- },
-
- hlMember : function(member){
- var el = Ext.fly(this.cclass + '-' + member);
- if(el){
- el.up('tr').highlight('#cadaf9');
- }
- }
-});
-
-
-MainPanel = function(){
-
- this.searchStore = new Ext.data.Store({
- proxy: new Ext.data.ScriptTagProxy({
- url: 'http://extjs.com/playpen/api.php'
- }),
- reader: new Ext.data.JsonReader({
- root: 'data'
- },
- ['cls', 'member', 'type', 'doc']
- ),
- baseParams: {},
- listeners: {
- 'beforeload' : function(){
- this.baseParams.qt = Ext.getCmp('search-type').getValue();
- }
- }
- });
-
- MainPanel.superclass.constructor.call(this, {
- id:'doc-body',
- region:'center',
- margins:'0 5 5 0',
- resizeTabs: true,
- minTabWidth: 135,
- tabWidth: 135,
- plugins: new Ext.ux.TabCloseMenu(),
- enableTabScroll: true,
- activeTab: 0,
-
- items: {
- id:'welcome-panel',
- title: 'API Home',
- autoLoad: {url: 'welcome.html', callback: this.initSearch, scope: this},
- iconCls:'icon-docs',
- autoScroll: true,
- tbar: [
- 'Search: ', ' ',
- new Ext.ux.SelectBox({
- listClass:'x-combo-list-small',
- width:90,
- value:'Starts with',
- id:'search-type',
- store: new Ext.data.SimpleStore({
- fields: ['text'],
- expandData: true,
- data : ['Starts with', 'Ends with', 'Any match']
- }),
- displayField: 'text'
- }), ' ',
- new Ext.app.SearchField({
- width:240,
- store: this.searchStore,
- paramName: 'q'
- })
- ]
- }
- });
-};
-
-Ext.extend(MainPanel, Ext.TabPanel, {
-
- initEvents : function(){
- MainPanel.superclass.initEvents.call(this);
- this.body.on('click', this.onClick, this);
- this.body.on({
- mouseover: this.onMarginEnter,
- mouseout: this.onMarginLeave,
- scope: this,
- delegate: 'td.micon'
- });
- new Ext.ToolTip({
- renderTo: document.body,
- target: this.body,
- delegate: 'td.micon',
- showDelay: 100,
- dismissDelay: 1000,
- listeners: {
-// Don't show if you *can't* expand it.
- beforeshow: function(t) {
- var tr = Ext.get(t.triggerElement.parentNode);
- var result = tr.hasClass("expandable");
- if (result) {
- t.body.dom.innerHTML = (tr.hasClass("expanded")) ? "Click to collapse" : "Click to expand";
- }
- return result;
- }
- }
- });
- },
-
- onMarginEnter: function(e) {
- var t = e.getTarget('td.micon', 2, true);
- if (t && Ext.fly(t.dom.parentNode).hasClass("expandable")) {
- t.addClass('over');
- }
- },
-
- onMarginLeave: function(e) {
- var t = e.getTarget('td.micon', 2, true), toTd = Ext.get(e.getRelatedTarget());
- if (toTd) toTd = toTd.up('td.micon', 2);
- if (!toTd || (toTd !== t)) {
- t.removeClass('over');
- }
- },
-
- onClick: function(e, target){
- if(target = e.getTarget('a:not(.exi)', 3)){
- var cls = Ext.fly(target).getAttributeNS('ext', 'cls');
- e.stopEvent();
- if(cls){
- var member = Ext.fly(target).getAttributeNS('ext', 'member');
- this.loadClass(target.href, cls, member);
- }else if(target.className == 'inner-link'){
- this.getActiveTab().scrollToSection(target.href.split('#')[1]);
- }else{
- window.open(target.href);
- }
- }else if(target = e.getTarget('.micon', 2)){
- e.stopEvent();
- var tr = Ext.fly(target.parentNode);
- if(tr.hasClass('expandable')){
- tr.toggleClass('expanded');
- }
- }
- },
-
- loadClass : function(href, cls, member){
- var id = 'docs-' + cls;
- var tab = this.getComponent(id);
- if(tab){
- this.setActiveTab(tab);
- if(member){
- tab.scrollToMember(member);
- }
- }else{
- var autoLoad = {url: href};
- if(member){
- autoLoad.callback = function(){
- Ext.getCmp(id).scrollToMember(member);
- }
- }
- var p = this.add(new DocPanel({
- id: id,
- cclass : cls,
- autoLoad: autoLoad,
- iconCls: Docs.icons[cls]
- }));
- this.setActiveTab(p);
- }
- },
-
- initSearch : function(){
- // Custom rendering Template for the View
- var resultTpl = new Ext.XTemplate(
- '