Skip to content

Commit

Permalink
config template
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Aug 6, 2009
1 parent 11ff741 commit a405129
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 0 deletions.
122 changes: 122 additions & 0 deletions app/omb/views/admin/_config.html
@@ -0,0 +1,122 @@

<?php include 'wp-content/language/lang_chooser.php'; //Loads the language-file ?>

<script type="text/javascript">
// <![CDATA[

$(document).ready(function() {

<?php foreach ($setenv as $n=>$v) : ?>
<?php
$modevar = 'n'.$n.'mode';
$urlvar = 'n'.$n.'url';
$entryvar = 'n'.$n.'entry';
?>
<?php if (isset($$urlvar)) : ?>
<?php setting_widget_text_helper('setenv'.$n,$$modevar,$$urlvar,$$entryvar); ?>
<?php endif; ?>
<?php endforeach; ?>
<?php foreach ($envpost as $n=>$v) : ?>
<?php if (!isset($setenv[$n]) && isset($txt['config_'.$n])) : ?>
<?php
$urlvar = 'n'.$n.'url';
?>
<?php if (isset($$urlvar)) : ?>
<?php setting_widget_text_post_helper($n,$$urlvar); ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php foreach ($envpost2 as $n=>$v) : ?>
<?php if (!isset($setenv[$n]) && isset($txt['config_'.$n])) : ?>
<?php
$urlvar = 'n'.$n.'url';

?>

<?php if (isset($$urlvar)) : ?>
<?php setting_widget_text_post_helper($n,$$urlvar); ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>

});
// ]]>
</script>




<h1>Configuration</h1>
<table border="0" cellspacing="10">


<?php foreach ($envpost as $n=>$v) : ?>
<?php if (!isset($setenv[$n]) && isset($txt['config_'.$n])) : ?>


<tr><td>
<p> <?php echo $txt['config_'.$n]; ?></p>
</td><td><p class="jeditable_<?php echo $n; ?>" id="jeditable_<?php echo $n; ?>"><?php echo $v; ?></p>
</td></tr>
<?php endif; ?>
<?php endforeach; ?>


<?php foreach ($setenv as $n=>$v) : ?>
<?php
$modevar = 'n'.$n.'mode';
?>
<?php if (isset($$modevar)) : ?>
<?php if (isset($txt['config_'.$n])) : ?>
<tr><td>
<p> <?php echo $txt['config_'.$n]; ?></p>
</td><td><p class="jeditable_setenv<?php echo $n; ?>" id="jeditable_setenv<?php echo $n; ?>"><?php echo $$modevar->value; ?></p>
</td></tr>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>






<?php foreach ($envpost2 as $n=>$v) : ?>
<?php if (!isset($setenv[$n]) && isset($txt['config_'.$n])) : ?>


<tr><td>
<p> <?php echo $txt['config_'.$n]; ?></p>
</td><td><p class="jeditable_<?php echo $n; ?>" id="jeditable_<?php echo $n; ?>"><?php echo $v; ?></p>
</td></tr>
<?php endif; ?>
<?php endforeach; ?>

</table>


<?php if (count($setother)>0) : ?>
<h1>Permissions</h1>
<ul>
<?php foreach ($setperm as $n=>$v) : ?>
<?php echo "<li>".$n." = ".$v."</li>"; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>

<?php if (count($setother)>0) : ?>
<h1>Other Settings</h1>
<ul>
<?php foreach ($setother as $n=>$v) : ?>
<?php echo "<li>".$n." = ".$v."</li>"; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
54 changes: 54 additions & 0 deletions app/omb/views/identities/_background.html
@@ -0,0 +1,54 @@
<?php include 'wp-content/language/lang_chooser.php'; //Loads the language-file ?>

<script src="<?php base_path(); ?>resource/jquery.ajaxfileupload.js" type="text/javascript"></script>
<script src="<?php base_path(); ?>resource/jeditable/jquery.jeditable.js" type="text/javascript"></script>
<script src="<?php base_path(); ?>resource/jeditable/jquery.highlightFade.js" type="text/javascript"></script>
<script src="<?php base_path(); ?>resource/jeditable/jquery.jeditable.ajaxupload.js" type="text/javascript"></script>


<script type="text/javascript">
// <![CDATA[

$(document).ready(function() {

var submit_to = "<?php echo $settingurl; ?>";

$(".editable_setting").mouseover(function() {
$(this).highlightFade({end:'#def'});
});
$(".editable_setting").mouseout(function() {
$(this).highlightFade({end:'#fff', speed:200});
});
$(".editable_setting").editable(submit_to, {
indicator : "<img src='<?php base_path(); ?>resource/jeditable/indicator.gif'>",
submitdata : function() {
return {
"entry[etag]" : "<?php echo $Entry->etag; ?>",
};
},
name : "setting[value]",
type : "textarea",
submit : "<?php echo $txt['settings_ok']; ?>",
noappend : true,
cancel : "<?php echo $txt['settings_cancel']; ?>",
tooltip : "<?php echo $txt['settings_edit']; ?>",
callback : function(value, settings) {
return(value);
}
});

<?php setting_widget_helper('tile',$setting_mode,$setting_url,$setting_entry,$setting_list); ?>

});


// ]]>
</script>

<div style="width:400px;">Background Image URL:
<p class="editable_setting" id="editable_setting"><?php echo $settingvalue->value; ?></p>
Tile Background Image:
<p class="jeditable_tile" id="jeditable_tile"><?php echo placeholder_value($setting_mode,$setting_list) ?></p>
</div>


0 comments on commit a405129

Please sign in to comment.