CC-4583: Use AJAX calls instead of refreshing entire page

-done
This commit is contained in:
denise 2012-10-26 18:09:30 -04:00
parent 0ab1353564
commit 3a7700eaac
12 changed files with 185 additions and 82 deletions

View file

@ -1,4 +1,4 @@
<form method="<?php echo $this->element->getMethod() ?>" action="<?php echo $this->element->getAction() ?>" enctype="multipart/form-data">
<form method="<?php echo $this->element->getMethod() ?>" enctype="multipart/form-data">
<?php echo $this->element->getSubform('preferences_general') ?>
@ -15,8 +15,6 @@
<?php echo $this->element->getSubform('preferences_soundcloud') ?>
</div>
<div class="button-bar bottom" id="submit-element">
<?php echo $this->element->getElement('submit') ?>
</div>
<?php echo $this->element->getElement('pref_save') ?>
</form>

View file

@ -1,11 +1,9 @@
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences">
<h2 style="float:left">Preferences</h2>
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
<form method="post" action=<?php echo $baseUrl . "/Preference/index"?> enctype="application/x-www-form-urlencoded">
<form method="post" id="pref_form" enctype="application/x-www-form-urlencoded">
<div class="button-bar bottom" id="submit-element" style="float:right">
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
</div>
<button name="pref_save" id="pref_save" type="button" class="btn btn-small right-floated">Save</button>
<div style="clear:both"></div>
<?php

View file

@ -2,10 +2,8 @@
<h2 <?php if($this->enable_stream_conf == "true"){?>style="float:left"<?php }?>>Stream Settings</h2>
<?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?>
<?php if($this->enable_stream_conf == "true"){?>
<form method="post" action=<?php echo $baseUrl . "/Preference/stream-setting"?> enctype="application/x-www-form-urlencoded" onsubmit="return confirm('<?php echo $this->confirm_pypo_restart_text ?>');">
<div class="button-bar bottom" id="submit-element" style="float:right">
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
</div>
<form method="post" id="stream_form" enctype="application/x-www-form-urlencoded">
<button name="stream_save" id="stream_save" type="button" class="btn btn-small right-floated">Save</button>
<div style="clear:both"></div>
<?php }?>
<?php echo $this->statusMsg;?>
@ -79,9 +77,8 @@
?>
</fieldset>
<?php if($this->enable_stream_conf == "true"){?>
<div class="button-bar bottom" id="submit-element">
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
</div>
<br />
<button name="stream_save" id="stream_save" type="button" class="btn btn-small right-floated">Save</button>
<?php }?>
</div>
</form>