Beispiel #1
0
 /**
  * Check if JavaScript language variables was added first,
  * then generate template. 
  * @see API/VIEWS/SF_VIEW_AbstractView#generate()
  */
 public function generate()
 {
     // place default js files in header (and not in footer)
     if ($this->default_js_files instanceof SF_VIEW_DefaultJsFiles) {
         $this->addTemplateVar('DEFAULT_JS_FILES', $this->default_js_files);
     }
     return parent::generate();
 }
Beispiel #2
0
 /**
  * Check if JavaScript language variables was added first,
  * then generate template. 
  * @see API/VIEWS/SF_VIEW_AbstractView#generate()
  */
 public function generate()
 {
     // if no default js files are set, then generate some
     if ($this->prevent_default_js_files == FALSE && $this->default_js_files == null) {
         $this->default_js_files = sf_api('VIEW', 'DefaultJsFiles');
     }
     // place default js files in footer (and not in header)
     if ($this->default_js_files instanceof SF_VIEW_DefaultJsFiles) {
         // add custom lang strings
         $this->default_js_files->addJsLang($this->js_custom_lang);
         // add custom js files if any
         if (count($this->js_custom_files) > 0) {
             foreach ($this->js_custom_files as $custom_files) {
                 $this->default_js_files->addJsFiles($custom_files['files'], $custom_files['use_custom_path']);
             }
         }
         $this->addTemplateVar('DEFAULT_JS_FILES', $this->default_js_files);
     }
     return parent::generate();
 }
Beispiel #3
0
 /**
  * Send the HTTP header first and then generate the template
  * @see API/VIEWS/SF_VIEW_AbstractView#generate()
  */
 public function generate()
 {
     $this->sendHttpHeader();
     return parent::generate();
 }
Beispiel #4
0
 /**
  * Check if JavaScript language variables was added first,
  * then generate template. 
  * @see API/VIEWS/SF_VIEW_AbstractView#generate()
  */
 public function generate()
 {
     if ($this->isset_js_lang == FALSE) {
         $this->addJsLang();
     }
     return parent::generate();
 }