Exemple #1
0
function a_remote_dialog_toggle($options)
{
    if (!isset($options['id'])) {
        throw new sfException("Required id option not passed to a_dialog_toggle");
    }
    if (!isset($options['label'])) {
        throw new sfException("Required label option not passed to a_dialog_toggle");
    }
    if (!isset($options['action'])) {
        throw new sfException("Required action option not passed to a_dialog_toggle");
    }
    $id = $options['id'];
    $action = $options['action'];
    $label = $options['label'];
    if (isset($options['chadFrom'])) {
        $chadFrom = $options['chadFrom'];
    }
    if (isset($options['loading'])) {
        $loading = $options['loading'];
    }
    if (isset($options['hideToggle']) && $options['hideToggle'] == true) {
        $before = " \$('.{$id}-loading').show();";
    } else {
        $before = "\$('.{$id}-button.open').hide(); \$('.{$id}-loading').show();";
    }
    $s = '';
    $s .= jq_link_to_remote(__($label, null, 'apostrophe'), array("url" => $action, "update" => $id, "script" => true, "before" => $before, "complete" => "\$('#{$id}').fadeIn();\n  \t\t\t\t\t\t\t\t\t \$('.{$id}-loading').hide();\n\t\t\t\t\t\t\t\t\t\t \t\$('.{$id}-button.open').hide();\n  \t\t\t\t\t\t\t\t\t \$('#{$id}-button-close').show();" . (isset($chadFrom) ? "var arrowPosition = parseInt(\$('{$chadFrom}').offset().left);\n      \t\t\t\t\t\t\t\t \$('#{$id} .a-chad').css('left',arrowPosition+'px'); " : "") . "\n  \t\t\t\t\t\t\t\t\t aUI('#{$id}');\n  \t\t\t\t\t\t\t\t\t\$('.a-page-overlay').show();"), array('class' => "{$id}-button open", 'id' => "{$id}-button-open"));
    $s .= jq_link_to_function(__($label, null, 'apostrophe'), "\$('#{$id}-button-close').hide(); \n\t\t \$('#{$id}-button-open').show(); \n\t\t \$('#{$id}').hide();\n\t\t \$('.a-page-overlay').hide();", array('class' => "{$id}-button close", 'id' => "{$id}-button-close", 'style' => 'display:none;'));
    if (isset($loading)) {
        $s .= image_tag($loading, array('class' => "{$id}-loading", 'style' => 'display:none;'));
    }
    return $s;
}
Exemple #2
0
?>
	<?php 
echo $form['title']->render(array('id' => 'a-breadcrumb-create-title'));
?>

	<ul class="a-form-controls a-breadcrumb-create-childpage-controls">
	  <li>
			<button type="submit" class="a-btn"><?php 
echo __('Create Page', null, 'apostrophe');
?>
</button>			
		</li>
	  <li>
			<?php 
echo jq_link_to_function(__("cancel", null, 'apostrophe'), '$("#a-breadcrumb-create-childpage-form").hide(); 
				$("#a-breadcrumb-create-childpage-button").fadeIn(); 
				$("#a-breadcrumb-create-childpage-button").prev(".a-i").fadeIn();', array('class' => 'a-btn icon a-cancel'));
?>
		</li>
	</ul>

	<script type="text/javascript" charset="utf-8">
		aInputSelfLabel('#a-breadcrumb-create-title', <?php 
echo json_encode(__('Page Title', null, 'apostrophe'));
?>
);
	</script>

</form>

<?php 
        }
        ?>
          </center>
      </td>
    </tr>
    <?php 
    }
    ?>
  </tbody>
</table>
<?php 
    echo $pager->getNbResults();
    ?>
 members selected according to these criteria<br/>
<?php 
    echo jq_link_to_function('search again', "document.location=''");
}
?>
<div id="on_accept_container1" class="on-accept-dialog" style="display:none">
       Do you wish, to show this MOP on pilot view?
     <br />
</div>

<div id="on_decline_container1" class="on-decline-dialog" style="display:none">
       Are you sure, to hide this MOP from pilot view?
      <br />
</div>

<script type="text/javascript">
    function onActive(pilot_id)
    {      
Exemple #4
0
    echo link_to(__('Log Out', null, 'apostrophe'), sfConfig::get('app_a_actions_logout', 'sfGuardAuth/signout'), array('class' => 'a-btn'));
    ?>
</li>
<?php 
} else {
    ?>
	<?php 
    include_partial('a/language');
    ?>
  <?php 
    // You can easily turn off the 'Log In' link via app.yml
    ?>
  <?php 
    if (sfConfig::get('app_a_login_link', true)) {
        ?>
    <li>
			<?php 
        echo jq_link_to_function(__('Login', null, 'apostrophe'), "\$('#a-login-form-container').fadeIn(); \$('#signin_username').focus(); \$('.a-page-overlay').fadeIn('fast');", array('class' => 'a-btn', 'id' => 'a-login-button'));
        ?>
	
			<div id="a-login-form-container" class="dropshadow a-options">
				<?php 
        include_component('a', 'signinForm');
        ?>
			</div>
		</li>
  <?php 
    }
}
?>
</ul>
<?php 
echo jq_form_remote_tag(array('url' => 'aMedia/addCategory', 'update' => 'a-media-edit-categories', 'complete' => '$("#a_media_category_name").val("")'));
?>

<?php 
echo $form;
?>

<div class="a-form-row submit">
<input type="submit" name="add" value="<?php 
echo __('add', null, 'apostrophe');
?>
" class="a-submit icon a-add no-label" />
<?php 
echo jq_link_to_function(__('Cancel', null, 'apostrophe'), '$("#a-media-edit-categories-button, #a-media-no-categories-message, #a-category-sidebar-list").show(); $("#a-media-edit-categories").html("")', array('class' => 'a-btn icon no-label a-cancel'));
?>
</div>
</form>

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
	aInputSelfLabel('#a_media_category_name', <?php 
echo json_encode(__('New Category', null, 'apostrophe'));
?>
);	
	$('#a-media-edit-categories-button, #a-media-no-categories-messagem, #a-category-sidebar-list').hide();
	$('#a_media_category_name').focus();
	// Temporary - See CSS for Notes
	$('#a_media_category_description').parents('div.a-form-row').addClass('hide-description').parent().attr('id','a-media-category-form');
});
Exemple #6
0
<?php

use_helper('jQuery', 'JavascriptBase');
?>
<span id="tax_<?php 
echo $rowId;
?>
_<?php 
echo $taxKey;
?>
"><?php 
echo jq_link_to_function('', "\$('#tax_" . $rowId . "_" . $taxKey . "').remove(); \$(document).trigger('GlobalUpdateEvent');");
?>
<select class="observable tax" id="item_taxes_list_<?php 
echo $rowId;
?>
_<?php 
echo $taxKey;
?>
" name="invoice[Items][<?php 
echo $rowId;
?>
][taxes_list][]">
  <?php 
$taxes = Doctrine::getTable('Tax')->createQuery()->where('id = ?', $taxKey)->orWhere('active = ?', 1)->execute();
foreach ($taxes as $o_tax) {
    ?>
  <option value="<?php 
    echo $o_tax->id;
    ?>
" <?php 
Exemple #7
0
              <?php 
            echo jq_link_to_remote('remove', array('url' => 'account/ajaxDeleteAircraft?id=' . $pilot_aircraft->getId(), 'success' => "\$('#pilot_aircraft_{$pilot_aircraft->getId()}').remove();"), array('confirm' => 'Are you sure?'));
            ?>
            <?php 
        }
        ?>
            </td>
          </tr>
          <?php 
    }
    ?>
        </table>
      </div>
      <div class="holder">
        <h4>Availability <?php 
    echo jq_link_to_function('save your changes', 'saveAvailability()', array('style' => 'display:none;', 'class' => 'link-edit', 'id' => 'save_availability'));
    ?>
</h4>
        <form id="available_form" action="<?php 
    echo url_for('account/saveAvailability');
    ?>
">
          <table>
            <tr>
              <td>
                <label for="available">Available</label>
                <input type="radio" id="available" value="1" name="available" <?php 
    if ($availability->getNotAvailable() != 1) {
        echo 'checked="checked"';
    }
    ?>
Exemple #8
0
<?php 
echo $form['aviation_contacts'];
?>
 <?php 
echo $form['aviation_contacts']->renderLabel(null, array('class' => 'raw'));
echo $form['aviation_contacts']->renderError();
?>
</div>
</div>
<div class="wrap"><label>I am a member of</label>
<div class="wrap">
<div class="wrap">Select: <?php 
echo jq_link_to_function('All', "\$('.wiss').attr('checked', 'checked');");
?>
, <?php 
echo jq_link_to_function('None', "\$('.wiss').attr('checked', false);");
?>
</div>
<br />

<?php 
echo $form['member_aopa'];
?>
 <?php 
echo $form['member_aopa']->renderLabel(null, array('class' => 'raw'));
echo $form['member_aopa']->renderError();
?>
 <br clear="all" />
<?php 
echo $form['member_kiwanis'];
?>
function a_sub_crud_nonajax_edit($label, $buttonId, $staticId, $formId, $visible = true)
{
    return jq_link_to_function('edit', "\$('#{$buttonId}').hide(); \$('#{$staticId}').hide(); \$('#{$formId}').show();", array('class' => 'a-form-edit-button', 'id' => $buttonId, 'style' => $visible ? '' : 'display: none'));
}
Exemple #10
0
foreach ($max_array as $i => $v) {
    if ($i) {
        echo ' | ';
    }
    if ($max != $v) {
        echo jq_link_to_remote($v, array('url' => 'role/list?max=' . $v, 'before' => "\$('#indicator').show();", 'success' => "\$('#indicator').hide(); \$('#roles').html(data);"));
    } else {
        echo $v;
    }
}
?>

<div class="pager">
  <form onsubmit="navigate($('#role_page').val());return false;" action="#">
    <?php 
echo jq_link_to_function('Previous', "navigate(" . $pager->getPreviousPage() . ")", array('class' => 'btn-pager-prev'));
?>
    <input type="text" id="role_page" class="active-page" value="<?php 
echo $pager->getPage();
?>
"/>
    <strong>of <?php 
echo jq_link_to_function($pager->getLastPage(), "navigate(" . $pager->getLastPage() . ")");
?>
</strong>
    <?php 
echo jq_link_to_function('Next', "navigate(" . $pager->getNextPage() . ")", array('class' => 'btn-pager-next'));
?>
    <input type="submit" class="hide"/>
  </form>
</div>
Exemple #11
0
    echo $form['id']->render(array('id' => 'a-breadcrumb-rename-id'));
    ?>
	<?php 
    echo $form['title']->render(array('id' => 'a-breadcrumb-rename-title'));
    ?>

	  <ul id="a-breadcrumb-rename-controls" class="a-form-controls a-breadcrumb-controls rename" style="display:none;">
			<li>
				<button id="a-breadcrumb-rename-submit" type="submit" class="a-btn"><?php 
    echo __('Rename', null, 'apostrophe');
    ?>
</button>							
			</li>
	  	<li>
				<?php 
    echo jq_link_to_function(__("cancel", null, 'apostrophe'), '', array('class' => 'a-btn icon a-cancel event-default'));
    ?>
	  	</li>
	  </ul>

  </form>

	<script type="text/javascript" charset="utf-8">
		$(document).ready(function() {

			var renameForm = $('#a-breadcrumb-rename-form');
			renameForm.prepend('<b id="a-breadcrumb-rename-title-spacer" style="display:none;float:left;white-space:nowrap;">' + <?php 
    echo json_encode(str_replace(' ', '-', $page->getTitle()));
    ?>
 + '</b>');
Exemple #12
0
      <?php 
if ($can_edit) {
    ?>
          <form action="#" onsubmit="$('#total').click();return false;">
            <span class="passenger-form">
              <?php 
    echo $form['license_type']->render(array('id' => 'total_edit', 'style' => 'display:none;', 'class' => 'text narrow revertable revertval'));
    ?>
            </span>
          </form>
          <span id="license_type" class="revertable revertval in-place"><?php 
    echo $pilot->getTotalHours() ? $pilot->getTotalHours() : '--';
    ?>
</span>
          <?php 
    echo jq_link_to_function('edit', "changeValue('license_type', this.id, 'total_edit', 'total_callbeack');", array('id' => 'license_type', 'class' => 'hide'));
    ?>
          <br clear="all"/>
      <?php 
} else {
    ?>
          <?php 
    echo $pilot->getTotalHours() ? $pilot->getTotalHours() : '--';
    ?>
      <?php 
}
?>
      </dd>
      
      <dt>Date Oriented:</dt>
      <dd><?php 
<?php

use_helper('jQuery');
$role_ids = array();
foreach ($email_list->getEmailListRolesJoinRole() as $i => $email_list_role) {
    ?>
  <?php 
    $role_ids[] = $email_list_role->getRoleId();
    ?>
  <?php 
    echo ($i ? ',' : '') . $email_list_role->getRole()->getTitle();
}
?>
<br/>
<?php 
echo jq_link_to_function('edit', 'editManagersFor(' . $email_list->getId() . ', [' . implode(',', $role_ids) . '], this)');
Exemple #14
0
            <?php 
if ($can_edit) {
    ?>
              <form action="#" onsubmit="$('#deceased_comment_change').click();return false;">
                <span class="passenger-form">
                  <?php 
    echo $form['deceased_comment']->render(array('id' => 'deceased_comment_edit', 'style' => 'display:none;', 'class' => 'text narrow revertable revertval'));
    ?>
                </span>
              </form>
              <span id="deceased_comment" class="revertable revertval in-place"><?php 
    echo $person->getDeceasedComment() ? $person->getDeceasedComment() : '--';
    ?>
</span>
              <?php 
    echo jq_link_to_function('change', "changeValue('deceased_comment', this.id, 'deceased_comment_edit', 'deceased_comment');", array('id' => 'deceased_comment_change', 'class' => 'hide'));
    ?>
            <?php 
} else {
    echo $person->getDeceasedComment() ? $person->getDeceasedComment() : '--';
}
?>
          </td>
          <td></td>
        </tr>
      </table>
    </div>
    
    <span id="indicator" style="display:none;">Please wait ...</span>
    <span id="notification" style="font-size: 15px; float: right; width: 356px; margin-top: 22px;"></span>
    
Exemple #15
0
<?php 
use_helper('jQuery');
echo jq_link_to_function('click will alert', 'alert(123)', array('id' => 'blabla'));
javascript_tag();
echo jq_visual_effect('fadeOut', '#blabla');
end_javascript_tag();
?>

Welcome to Angel Flight West !
    	<?php 
echo $form['password']->render();
?>
    	<?php 
echo $form['password']->renderError();
?>
		</div>

		<div class="a-form-row">
    	<?php 
echo $form['remember']->renderRow();
?>
		</div>
		
		<ul class="a-form-row submit">
    	<li>
				<input type="submit" class="a-submit" value="<?php 
echo __('Sign In', null, 'apostrophe');
?>
" />
			</li>
			<li>
				<?php 
echo jq_link_to_function(__('Cancel', null, 'apostrophe'), "\$('#a-login-form-container').fadeOut('fast'); \$('.a-page-overlay').fadeOut('fast');", array('class' => 'a-btn a-cancel'));
?>
			</li>
		</ul>
		
  </form>
</div>
Exemple #17
0
</table>

<div id="management" style="display:none; position:absolute; background-color: white; border:1px solid;">
  <form id="management_form" onsubmit="saveManagersFor(); return false;">
    <?php 
echo $role_widget->render('roles');
?>
    <?php 
echo input_hidden_tag('email_list_id');
?>
    <br/>
    <?php 
echo submit_tag('save');
?>
    <?php 
echo jq_link_to_function('cancel', "\$('#management').hide();");
?>
  </form>
  <img src="/images/loading.gif" id="management_loader" style="display: none;"/>
</div>

<script type="text/javascript">
//<![CDATA[
function saveIsPrivate(id)
{
  var $el = $('#is_private_'+id);
  $el.after('<img src="/images/loading.gif" id="loader_'+id+'"/>');
  $.ajax({
    url: '<?php 
echo url_for('email_list/ajaxSavePrivate');
?>
    ?>
	
	<?php 
    echo $form['title']->render(array('id' => 'a-breadcrumb-rename-title'));
    ?>

	  <ul id="a-breadcrumb-rename-controls" class="a-form-controls a-breadcrumb-controls rename" style="display:none;">
			<li>
				<input type="submit" class="a-btn a-submit" value="<?php 
    echo __('Rename', null, 'apostrophe');
    ?>
" />							
			</li>
	  	<li>
				<?php 
    echo jq_link_to_function(__("Cancel", null, 'apostrophe'), '', array('class' => 'a-btn a-cancel'));
    ?>
	  	</li>
	  </ul>

  </form>

	<script type="text/javascript" charset="utf-8">
		$(document).ready(function() {

			var renameForm = $('#a-breadcrumb-rename-form');
			renameForm.prepend('<b id="a-breadcrumb-rename-title-spacer" style="display:none;float:left;white-space:nowrap;">' + <?php 
    echo json_encode(str_replace(' ', '-', $page->getTitle()));
    ?>
 + '</b>');
Exemple #19
0
            ?>
  			  <?php 
        }
        ?>
  			  <li><?php 
        echo link_to(__($button->getLabel(), null, 'apostrophe'), $button->getLink(), array('class' => 'a-btn icon ' . $button->getCssClass()));
        ?>
</li>
  			<?php 
    }
    ?>
				<?php 
    if (0) {
        ?>
<li><?php 
        echo jq_link_to_function('Cancel', '', array('class' => 'a-btn icon a-cancel event-default'));
        ?>
</li><?php 
    }
    ?>
  		</ul>
  	</div>


  	<div class="a-global-toolbar-user-settings a-personal-settings-container">
			<div id="a-personal-settings"></div>
    </div>

	<?php 
}
?>
Exemple #20
0
      <?php 
    if ($is_air) {
        echo $from_airport->getIdent() . ' (' . $from_airport->getCity() . ', ' . $from_airport->getState() . ')';
    }
    ?>
    </td>
    <td>
      <?php 
    if ($is_air) {
        echo $to_airport->getIdent() . ' (' . $to_airport->getCity() . ', ' . $to_airport->getState() . ')';
    }
    ?>
    </td>
    <td>
      <?php 
    echo jq_link_to_function('remove', "\$('#leg_id_{$mission_leg->getId()}').remove(); \$(this).parent().parent().remove();");
    ?>
    </td>
  </tr>
  <tr>
      <td claspan="6" style="padding-top:10px;padding-bottom:10px;">
         <!--a class="btn-request" target="_blank" href="http://69.50.211.150/pilot_request/<?php 
    echo $mission_leg->getId();
    ?>
"><span>Request This Mission</span></a -->
          <a class="btn-request" target="_blank" href=<?php 
    echo url_for('pilotRequest/update?id=' . $mission_leg->getId(), true);
    ?>
><span>Request This Mission</span></a>

        
Exemple #21
0
    <?php 
    echo jq_link_to_function('', "\$('#tr_invoice_item_" . $rowId . " input.remove').val(1);\$('#tr_invoice_item_{$rowId}').hide();\$(document).trigger('GlobalUpdateEvent');", array('class' => 'remove-item xit'));
    ?>
    <?php 
    echo $invoiceItemForm['product_autocomplete']->render(array(), ESC_RAW);
    ?>
  </td>
  <?php 
}
?>
  <td class="description">
    <?php 
if (!$sf_user->has_module('products')) {
    ?>
    <?php 
    echo jq_link_to_function('', "\$('#tr_invoice_item_" . $rowId . " input.remove').val(1);\$('#tr_invoice_item_{$rowId}').hide();\$(document).trigger('GlobalUpdateEvent');", array('class' => 'remove-item xit'));
    ?>
    <?php 
}
?>
    <?php 
echo $invoiceItemForm->renderHiddenFields();
?>
    <?php 
echo $invoiceItemForm['description']->render(array(), ESC_RAW);
?>
  </td>
  <td class="right ucost"><?php 
if ($invoiceItemForm['unitary_cost']->hasError()) {
    echo $invoiceItemForm['unitary_cost']->render(array('class' => 'error'), ESC_RAW);
} else {
Exemple #22
0
  <?php 
    $controlsSlot = true;
}
?>

<?php 
if ($controlsSlot) {
    ?>
	<?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
}
?>

	<li class="a-controls-item edit">
  <?php 
echo jq_link_to_function(isset($label) ? __($label, null, 'apostrophe') : __("edit", null, 'apostrophe'), "", array('id' => "a-slot-edit-{$pageid}-{$name}-{$permid}", 'class' => isset($class) ? $class : 'a-btn icon a-edit', 'title' => isset($title) ? $title : __('Edit', null, 'apostrophe')));
?>
	<script type="text/javascript">
	$(document).ready(function(){
		var editBtn = $('#a-slot-edit-<?php 
echo "{$pageid}-{$name}-{$permid}";
?>
');
		var editSlot = $('#a-slot-<?php 
echo "{$pageid}-{$name}-{$permid}";
?>
');
		editBtn.click(function(event){
			$(this).parent().addClass('editing-now');
			$(editSlot).children('.a-slot-content').children('.a-slot-content-container').hide(); // Hide content
			$(editSlot).children('.a-slot-content').children('.a-slot-content-container').hide(); // Hide content
Exemple #23
0
            <div id="template_message" style="display:none; clear:both;"></div>
          </span>
        </div>
      </div>
      <div class="wrap">
        <label>Attachment</label>
        <div class="wrap">
          <input type="file" name="attachment1" id="attachment1"/>
          <input type="file" name="attachment2" id="attachment2" style="clear:left; display: none;"/>
          <input type="file" name="attachment3" id="attachment3" style="clear:left; display: none;"/>
          <input type="file" name="attachment4" id="attachment4" style="clear:left; display: none;"/>
          <input type="file" name="attachment5" id="attachment5" style="clear:left; display: none;"/>
          <br clear="all"/>
          <span id="attachment_message" style="display: none;">You attach up to 5 files</span>
          <?php 
echo jq_link_to_function('+ add another file', 'addAttachment(this);', array('style' => 'clear:left;'));
?>
        </div>
      </div>
      <div class="form-submit">
        <a class="btn-action" href="#" onclick="$('#form_submit').click();return false;"><span>Send Email &raquo;</span><strong> </strong></a>
        <input type="submit" id="form_submit" class="hide" />
      </div>
    </div>
  </div>
</form>

<script type="text/javascript">
tinyMCE.init({
  mode : "exact",
  theme : "advanced",
Exemple #24
0
/**
 * Returns a link to a remote action defined by 'url'
 * (using the 'url_for()' format) that's called in the background using
 * XMLHttpRequest. The result of that request can then be inserted into a
 * DOM object whose id can be specified with 'update'.
 * Usually, the result would be a partial prepared by the controller with
 * either 'render_partial()'.
 *
 * Examples:
 *  <?php echo link_to_remote('Delete this post'), array(
 *    'update' => 'posts',
 *    'url'    => 'destroy?id='.$post.id,
 *  )) ?>
 *  <?php echo link_to_remote(image_tag('refresh'), array(
 *    'update' => 'emails',
 *    'url'    => '@list_emails',
 *  )) ?>
 *
 * You can also specify a hash for 'update' to allow for
 * easy redirection of output to an other DOM element if a server-side error occurs:
 *
 * Example:
 *  <?php echo link_to_remote('Delete this post', array(
 *      'update' => array('success' => 'posts', 'failure' => 'error'),
 *      'url'    => 'destroy?id='.$post.id,
 *  )) ?>
 *
 * Optionally, you can use the 'position' parameter to influence
 * how the target DOM element is updated. It must be one of
 * 'before', 'top', 'bottom', or 'after'.
 *
 * By default, these remote requests are processed asynchronous during
 * which various JavaScript callbacks can be triggered (for progress indicators and
 * the likes). All callbacks get access to the 'request' object,
 * which holds the underlying XMLHttpRequest.
 *
 * To access the server response, use 'request.responseText', to
 * find out the HTTP status, use 'request.status'.
 *
 * If you are using JSON, you can access it via the 'data' parameter
 *
 * Example:
 *  <?php echo jq_link_to_remote($word, array(
 *    'url'      => '@undo?n='.$word_counter,
 *    'complete' => 'undoRequestCompleted(request)'
 *  )) ?>
 *
 * The callbacks that may be specified are (in order):
 *
 * 'loading'                 Called when the remote document is being
 *                           loaded with data by the browser.
 * 'loaded'                  Called when the browser has finished loading
 *                           the remote document.
 * 'interactive'             Called when the user can interact with the
 *                           remote document, even though it has not
 *                           finished loading.
 * 'success'                 Called when the XMLHttpRequest is completed,
 *                           and the HTTP status code is in the 2XX range.
 * 'failure'                 Called when the XMLHttpRequest is completed,
 *                           and the HTTP status code is not in the 2XX
 *                           range.
 * 'complete'                Called when the XMLHttpRequest is complete
 *                           (fires after success/failure if they are present).,
 *
 * You can further refine 'success' and 'failure' by adding additional
 * callbacks for specific status codes:
 *
 * Example:
 *  <?php echo jq_link_to_remote($word, array(
 *       'url'     => '@rule',
 *       '404'     => "alert('Not found...? Wrong URL...?')",
 *       'failure' => "alert('HTTP Error ' + request.status + '!')",
 *  )) ?>
 *
 * A status code callback overrides the success/failure handlers if present.
 *
 * If you for some reason or another need synchronous processing (that'll
 * block the browser while the request is happening), you can specify
 * 'type' => 'synchronous'.
 *
 * You can customize further browser side call logic by passing
 * in JavaScript code snippets via some optional parameters. In
 * their order of use these are:
 *
 * 'confirm'             Adds confirmation dialog.
 * 'condition'           Perform remote request conditionally
 *                       by this expression. Use this to
 *                       describe browser-side conditions when
 *                       request should not be initiated.
 * 'before'              Called before request is initiated.
 * 'after'               Called immediately after request was
 *                       initiated and before 'loading'.
 * 'submit'              Specifies the DOM element ID that's used
 *                       as the parent of the form elements. By
 *                       default this is the current form, but
 *                       it could just as well be the ID of a
 *                       table row or any other DOM element.
 */
function jq_link_to_remote($name, $options = array(), $html_options = array())
{
    return jq_link_to_function($name, jq_remote_function($options), $html_options);
}
	<?php 
echo $form;
?>
	
	<ul id="a-personal-settings-footer" class="a-controls a-personal-settings-form-controls">
		<li>
		  <input type="submit" name="a-personal-settings-submit" value="<?php 
echo htmlspecialchars(__('Save Changes', null, 'apostrophe'));
?>
" id="a-personal-settings-submit" class="a-submit" />
		</li>
		<li>
			<?php 
echo jq_link_to_function(__('Cancel', null, 'apostrophe'), '
				$("#a-personal-settings").slideUp(); 
				$("#a-personal-settings-button-open").show(); 
				$("#a-personal-settings-button-close").addClass("loading").hide()
				$(".a-page-overlay").hide();', array('class' => 'a-btn icon a-cancel', 'title' => 'cancel'));
?>
		</li>
	</ul>

</form>

<script type="text/javascript" charset="utf-8">
	<?php 
if (0) {
    ?>
	aMultipleSelect('#a-personal-settings', { });
	aRadioSelect('.a-radio-select', { });
	<?php 
Exemple #26
0
    ?>
  <?php 
    // You can't switch variants until you've saved something for architectural reasons, however
    ?>
  <?php 
    // we do need this menu waiting in the wings so that we can turn it on on the first save of an edit view
    ?>
  <li class="a-controls-item variant" style="<?php 
    echo $slot->isNew() ? "display:none" : "";
    ?>
" id="a-<?php 
    echo "{$pageid}-{$name}-{$permid}-variant";
    ?>
">
		<?php 
    echo jq_link_to_function(__('Options', null, 'apostrophe'), '$("#a-' . $pageid . '-' . $name . '-' . $permid . '-variant").toggleClass("open").children("ul.a-variant-options").toggle()', array('class' => 'a-variant-options-toggle a-btn icon a-settings', 'id' => 'a-' . $pageid . '-' . $name . '-' . $permid . '-variant-options-toggle'));
    ?>
    <ul class="a-options a-variant-options dropshadow">
      <?php 
    foreach ($variants as $variant => $settings) {
        ?>
        <?php 
        // These classes and ids are carefully set up so that _ajaxUpdateSlot can
        ?>
        <?php 
        // target them later to change the active variant without rewriting the
        ?>
        <?php 
        // outer area container
        ?>
        <?php 
Exemple #27
0
    echo $form['photo' . $i]->renderError();
    ?>
          <?php 
    if ($i == 5) {
        echo "<br clear='left'/>You can add up to 5 images!";
    }
    ?>
        </div>
      </div>
      <?php 
}
?>
      <div class="wrap">
        <label></label>
        <?php 
echo jq_link_to_function('add another photo', "jQuery('.upload_photo').each(function(){ if (jQuery(this).is(':visible') == false) { jQuery(this).show(); return false;} });");
?>
		<br /> 
      </div>
      
      <div class="form-submit">
        <a onclick="$('#report_form_submit').click();return false;" href="#" class="btn-action"><span>Submit »</span><strong> </strong></a>
        <a href="<?php 
echo url_for('mission_report/review/');
?>
" class="cancel">Cancel</a>
        <input type="submit" id="report_form_submit" class="hide"/>		
      </div>
    </div>
  </form>
</div>