diff options
Diffstat (limited to 'views/mods')
| -rw-r--r-- | views/mods/mod_ordercondition/list.phtml | 125 | ||||
| -rw-r--r-- | views/mods/mod_ordercondition/settings_edit.phtml | 22 |
2 files changed, 85 insertions, 62 deletions
diff --git a/views/mods/mod_ordercondition/list.phtml b/views/mods/mod_ordercondition/list.phtml index 84b4ba1..6fd5051 100644 --- a/views/mods/mod_ordercondition/list.phtml +++ b/views/mods/mod_ordercondition/list.phtml @@ -8,7 +8,7 @@ <script type="text/javascript">/* <![CDATA[ */
jQuery(document).ready(function() {
-
+ /*
jQuery('.wpsg_mod_ordercondition_edit_name').each(function() {
var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
@@ -41,8 +41,9 @@ } );
} );
-
- jQuery('#wpsg_oc_list .wpsg_icon_remove').bind('click', function() {
+ */
+
+ jQuery('.wpsg_oc_removeLink').bind('click', function() {
if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Bestellbedingung entfernen möchten?', 'wpsg'); ?>')) return false;
@@ -51,7 +52,7 @@ jQuery.ajax( {
url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=remove&noheader=1',
data: {
- oc_id: jQuery(this).parent().attr("id")
+ oc_id: jQuery(this).attr("data-id")
},
success: function(data)
{
@@ -70,50 +71,82 @@ <?php echo __('Bisher keine Bestellbedingungen angelegt.', 'wpsg'); ?>
<?php } else { ?>
<?php $i = 0; foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { $i ++; ?>
-
+
+ <hr />
+
<div id="wpsg_mod_ordercondition_row_<?php echo $oc['id']; ?>">
- <?php echo wpsg_drawForm_Input($oc['id'], __('ID', 'wpsg'), $oc['id'], array('text' => true, 'remove' => '1')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_ordercondition_name_'.$oc['id'], __('Bezeichnung', 'wpsg'), $oc['name'], array('text' => true, 'class_text' => 'wpsg_mod_ordercondition_edit_name wpsg_editable')); ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_ordercondition_typ_'.$oc['id'], __('Wirkungsbereich', 'wpsg'), array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg')), $oc['typ'], array('class_select' => 'wpsg_editable wpsg_mod_ordercondition_edit_typ')); ?>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <label for="wpsg_mod_ordercondition_text_<?php echo $oc['id']; ?>"><?php echo __('Bedingungstext', 'wpsg'); ?>:</label>
- </div>
- <div class="wpsg_form_right">
- <p>
- <a href="#" onclick="return wpsg_showOCText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
- <textarea class="wpsg_mod_ordercondition_text" id="oc_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['text']); ?></textarea>
- <div class="wpsg_clear"></div><br />
- <input class="button" type="button" onclick="wpsg_saveOCText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br /><br />
- </div>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <label for="wpsg_mod_ordercondition_errortext_<?php echo $oc['id']; ?>"><?php echo __('Fehlertext', 'wpsg'); ?>:</label>
- </div>
- <div class="wpsg_form_right">
- <p>
- <a href="#" onclick="return wpsg_showOCErrorText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_errortext_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
- <textarea class="wpsg_mod_ordercondition_text" id="oc_errortext_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['errortext']); ?></textarea>
- <div class="wpsg_clear"></div><br />
- <input class="button" type="button" onclick="wpsg_saveOCErrorText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br />
- </div>
-
- <?php if ($i < sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><br /><hr /><?php } ?>
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <?php echo $oc['id']; ?><a data-id="<?php echo $oc['id']; ?>" class="wpsg_oc_removeLink" href="#"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span></a>
+ <?php echo wpsg_drawForm_TextEnd(__('ID', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <span id="oc_name_<?php echo $oc['id']; ?>"><?php echo $oc['name']; ?></span>
+ <?php echo wpsg_drawForm_TextEnd(__('Bezeichnung', 'wpsg')); ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#oc_name_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ oc_id: '<?php echo $oc['id']; ?>'
+ }
+ });
+
+ /* ]]> */</script>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <span id="oc_typ_<?php echo $oc['id']; ?>"><?php
+
+ if ($oc['typ'] == '1') echo __('Jede Bestellung', 'wpsg');
+ else if ($oc['typ'] == '2') echo __('Bestimmte Produkte', 'wpsg');
+ else echo __('Inaktiv', 'wpsg');
+
+ ?></span>
+ <?php echo wpsg_drawForm_TextEnd(__('Wirkungsbereich', 'wpsg')); ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#oc_typ_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+ type: 'string',
+ data: '<?php echo json_encode(array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg'))); ?>',
+ submitdata: {
+ field: 'typ',
+ oc_id: '<?php echo $oc['id']; ?>'
+ }
+ });
+
+ /* ]]> */</script>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <span class="wpsg_editable" id="oc_text_<?php echo $oc['id']; ?>"><?php echo wpsg_hspc($oc['text']); ?></span>
+ <?php echo wpsg_drawForm_TextEnd(__('Bedinungstext', 'wpsg')); ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#oc_text_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'text',
+ oc_id: '<?php echo $oc['id']; ?>'
+ },
+ type: 'textarea'
+ });
+
+ /* ]]> */</script>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <span class="wpsg_editable" id="oc_errortext_<?php echo $oc['id']; ?>"><?php echo wpsg_hspc($oc['errortext']); ?></span>
+ <?php echo wpsg_drawForm_TextEnd(__('Fehlertext', 'wpsg')); ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery('#oc_errortext_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'errortext',
+ oc_id: '<?php echo $oc['id']; ?>'
+ },
+ type: 'textarea'
+ });
+
+ /* ]]> */</script>
+
+ <?php if ($i == sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><hr /><?php } ?>
</div>
diff --git a/views/mods/mod_ordercondition/settings_edit.phtml b/views/mods/mod_ordercondition/settings_edit.phtml index 4bef845..0c7f4fa 100644 --- a/views/mods/mod_ordercondition/settings_edit.phtml +++ b/views/mods/mod_ordercondition/settings_edit.phtml @@ -150,19 +150,9 @@ </p>
<?php } ?>
-<div class="wpsg_admin_box">
-
- <div class="head">
- <div class="title">
- <div class="fulltab">
- <?php echo __('Bestellbedingungen', 'wpsg'); ?>
- <a title="<?php echo __('Neue Bestellbedingung anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addOC();"></a>
- </div>
- </div>
- </div>
-
- <div class="content" id="wpsg_oc_list">
- <?php echo $this->callMod('wpsg_mod_ordercondition', 'oc_list'); ?>
- </div>
-
-</div>
\ No newline at end of file +<div id="wpsg_oc_list">
+ <?php echo $this->callMod('wpsg_mod_ordercondition', 'oc_list'); ?>
+</div>
+
+<br />
+<a href="#" onclick="return wpsg_addOC();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neue Bestellbedingung anlegen', 'wpsg'); ?></a>
|
