Sha256: cdc656223d79214a28ce041088f7ead4b89c81b3443599e68cc0808382c9e95b

Contents?: true

Size: 1.02 KB

Versions: 12

Compression:

Stored size: 1.02 KB

Contents

// ==========================================================================
// Docs.DocFrameView
// ==========================================================================

require('core');

Docs.DocFrameView = SC.View.extend({
  
  // This is set to the test you want to run.
  doc: null,
  
  docObserver: function() {
    var doc = this.get('doc') ;
    var url = (doc) ? doc.get('url') : '' ;
    if (url.length > 0) {
      url = "/%@/%@/-docs/data/%@".fmt(window.urlPrefix,Docs.docsController.get('clientName'), url) ;
    }
    
    // make sure we clear out the old document settings if needed.
    var fdoc = (this.rootElement.contentWindow) ? this.rootElement.contentWindow.document : this.rootElement.document ;
    
    // if the document URL is already loaded, then reload it...
    if (url == this.rootElement.src) {
      if (fdoc && fdoc.location) fdoc.location.reload() ;
      
    // otherwise set to the new URL.
    } else {
      this.rootElement.src = url ;
    }
    
  }.observes('doc', 'isVisibleInWindow')
    
}) ;

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sproutcore-0.9.12 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.11 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.10 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.13 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.2 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.3 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.5 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.4 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.9 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.8 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.7 clients/sc_docs/views/doc_frame.js
sproutcore-0.9.6 clients/sc_docs/views/doc_frame.js