コード例 #1
0
 /**
  * This method is called after {@link XOAD_Server::notifyObservers}
  * is called.
  *
  * @access	public
  *
  * @return	bool	Always true.
  *
  */
 public function updateObserver($event, $arguments)
 {
     if ($event == 'dispatchLeave') {
         if (array_key_exists('returnValue', $arguments['response'])) {
             $arguments['response']['html'] = XOAD_HTML::process();
         }
     }
     return true;
 }
コード例 #2
0
ファイル: index.php プロジェクト: ivko/yii-xoad
 public function getPage($id, $activeId)
 {
     if ($id < 1 || $id > 4) {
         return null;
     }
     if ($activeId >= 1 && $activeId <= 4) {
         $activeTab =& XOAD_HTML::getElementById('page-' . $activeId);
         $activeTab->className = '';
     }
     $pageTab =& XOAD_HTML::getElementById('page-' . $id);
     $pageTab->className = 'active';
     $page = @join(null, @file(XOAD_BASE . '/examples/html/content/page' . $id . '.html'));
     $content =& XOAD_HTML::getElementById('content');
     $content->innerHTML = $page;
     return true;
 }
コード例 #3
0
ファイル: index.php プロジェクト: ivko/yii-xoad
 public function Import()
 {
     $formData = array();
     $formData['firstName'] = 'Bill';
     $formData['lastName'] = 'Gates';
     $formData['businessName'] = 'Microsoft';
     $formData['age'] = '49';
     $formData['gender'] = 'm';
     $formData['mail'] = 'One Microsoft Way';
     $formData['city'] = 'Redmond';
     $formData['state'] = 'WA';
     $formData['zip'] = '98052-6399';
     $formData['phone1'] = '(425) 882-8080';
     $formData['phone2'] = '(888) PC SAFETY';
     $formData['comments'] = "http://www.microsoft.com\nhttp://support.microsoft.com";
     $formData['browsers'] = array('ff', 'ns');
     $formData['email'] = '*****@*****.**';
     $formData['newsletter'] = 'html';
     $formData['agree'] = true;
     XOAD_HTML::importForm('mainForm', $formData);
 }
コード例 #4
0
ファイル: HTML.class.php プロジェクト: ivko/yii-xoad
 /**
  * Imports an associative array to the corresponding form elements.
  *
  * <p>Example:</p>
  * <code>
  * XOAD_HTML::importForm('mainForm', array('firstName' => 'First', 'lastName' => 'Last'));
  * </code>
  *
  * @access	public
  *
  * @param	string	$id			The client ID of the form.
  *
  * @param	string	$formData	Associative array that contains the
  *								values to import.
  *
  * @return	void
  *
  * @static
  *
  */
 public static function importForm($id, $formData)
 {
     $script = 'xoad.html.importForm(';
     $script .= XOAD_Client::register($id);
     $script .= ', ';
     $script .= XOAD_Client::register($formData);
     $script .= ');';
     XOAD_HTML::addScriptBlock($script);
 }