Subversion-Projekte lars-tiefland.ci

Revision

Revision 866 | Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
855 lars 1
<!-- $Id: edit_preiskalkulation.tpl 10438 2016-03-18 14:26:18Z tiefland $ -->
2
<script src="/js/jquery-1.8.3.min.js"></script>
3
<script src="/js/jquery-ui-1.9.0.custom.min.js"></script>
4
  <style>
5
  .ui-tooltip, .arrow:after {
6
    border: 2px solid white;
7
  }
8
  .ui-tooltip {
9
    padding: 10px 20px;
10
    border-radius: 20px;
11
    font: bold 14px "Helvetica Neue", Sans-Serif;
12
    text-transform: uppercase;
13
    box-shadow: 0 0 7px black;
14
  }
15
  .arrow {
16
    width: 70px;
17
    height: 16px;
18
    overflow: hidden;
19
    position: absolute;
20
    left: 50%;
21
    margin-left: -35px;
22
    bottom: -16px;
23
  }
24
  .arrow.top {
25
    top: -16px;
26
    bottom: auto;
27
  }
28
  .arrow.left {
29
    left: 20%;
30
  }
31
  .arrow:after {
32
    content: "";
33
    background: black;
34
    position: absolute;
35
    left: 20px;
36
    top: -20px;
37
    width: 25px;
38
    height: 25px;
39
    box-shadow: 6px 5px 9px -9px black;
40
    -webkit-transform: rotate(45deg);
41
    -moz-transform: rotate(45deg);
42
    -ms-transform: rotate(45deg);
43
    -o-transform: rotate(45deg);
44
    tranform: rotate(45deg);
45
  }
46
  .arrow.top:after {
47
    bottom: -20px;
48
    top: auto;
49
  }
50
			#demoWrapper {
51
				padding : 1em;
52
				width : 500px;
53
				border-style: solid;
54
			}
55
 
56
			#fieldWrapper {
57
			}
58
 
59
			#demoNavigation {
60
				margin-top : 0.5em;
61
				margin-right : 1em;
62
				text-align: right;
63
			}
64
 
65
			#data {
66
				font-size : 0.7em;
67
			}
68
 
69
			input {
70
				margin-right: 0.1em;
71
				margin-bottom: 0.5em;
72
			}
73
 
74
			.input_field_25em {
75
				width: 2.5em;
76
			}
77
 
78
			.input_field_3em {
79
				width: 3em;
80
			}
81
 
82
			.input_field_35em {
83
				width: 3.5em;
84
			}
85
 
86
			.input_field_12em {
87
				width: 12em;
88
			}
89
 
90
			label {
91
				margin-bottom: 0.2em;
92
				font-weight: bold;
93
				font-size: 0.8em;
94
			}
95
 
96
			label.error {
97
				color: red;
98
				font-size: 0.8em;
99
				margin-left : 0.5em;
100
			}
101
 
102
			.step span {
103
				float: right;
104
				font-weight: bold;
105
				padding-right: 0.8em;
106
			}
107
 
108
			.navigation_button {
109
				width : 70px;
110
                margin-bottom:10px;
111
			}
112
 
113
			#data {
114
					overflow : auto;
115
			}
116
 
117
			#step_visualization {
118
 
119
				margin : 2em;
120
			}
121
 
122
			#visualization_first{
123
				background-color : #ffffdd;
124
			}
125
 
126
			#visualization_finland{
127
				background-color : #ffff99;
128
			}
129
 
130
			#visualization_confirmation{
131
				background-color : #ffff44;
132
			}
133
 
134
			.visualization {
135
				border-style : solid;
136
				font-size: 0.8em;
137
			  font-weight: bold;
138
				padding-left: 1em;
139
				padding-right: 1em;
140
			}
141
            .indent
142
            {
143
                padding:10px;
144
            }
145
 
146
</style>
147
    <script>
148
        $(function(){
149
            $('#add').button({
150
                icons:{
151
                    primary:"ui-icon-plus"
152
                }
153
            }).click(add_art);
154
            $('.add').button({
155
                icons:{
156
                    primary:"ui-icon-plus"
157
                }
158
            }).click(add_stufe);
159
            $('.edit').button({
160
                icons:{
161
                    primary:"ui-icon-pencil"
162
                }
163
            }).click(edit_stufe);
164
            $('.del').button({
165
                icons:{
166
                    primary:"ui-icon-trash"
167
                }
168
            }).click(del_stufe);
169
            $( document ).tooltip({
170
                position: {
171
                    my: "center bottom-20",
172
                    at: "center top",
173
                    using: function( position, feedback ) {
174
                        $( this ).css( position );
175
                        $( "<div>" )
176
                            .addClass( "arrow" )
177
                            .addClass( feedback.vertical )
178
                            .addClass( feedback.horizontal )
179
                            .appendTo( this );
180
                    }
181
                }
182
            });
183
            $('#edit_dlg').dialog({
184
                autoOpen:false,
185
                modal:true,
186
                resizable:false,
187
                height:300,
188
                width:400,
189
                position: {
190
                    my:"center bottom",
191
                    at:"center top"
192
                },
193
                buttons:{
194
                    "specichern":function(){
195
                        $.post("/toolbox/saveCalcStufe.php",$('#save_calc_stufe').serializeArray(),function(html){
196
                            //alert(html);
197
                            $('#edit_dlg').dialog("close");
198
                            document.location.reload();
199
                        });
200
                    },
201
                    "abbrechen":function(){
202
                        $(this).dialog("close");
203
                    }
204
                }
205
            })
206
            $('#del_dlg').dialog({
207
                autoOpen:false,
208
                modal:true,
209
                resizable:false,
210
                position: {
211
                    my:"center bottom",
212
                    at:"center top"
213
                },
214
                buttons:{
215
                    "ja":function(){
216
                        $.get("/toolbox/delCalcStufe.php?id="+$('#del_stufe_id').html(),function(){
217
                            $('#del_dlg').dialog("close");
218
                            document.location.reload();
219
                        });
220
                    },
221
                    "nein":function(){
222
                        $(this).dialog("close");
223
                    }
224
                }
225
            })
226
        });
227
 
228
        function add_art(e)
229
        {
230
            e.preventDefault();
231
            $('#edit_dlg').load("/toolbox/getCalcStufe.php").dialog("open");
232
        }
233
        function add_stufe(e)
234
        {
235
            e.preventDefault();
236
            sId=this.id.split("__");
237
            art=sId[1];
238
            $('#edit_dlg').load("/toolbox/getCalcStufe.php?art="+art).dialog("open");
239
        }
240
        function edit_stufe(e)
241
        {
242
            e.preventDefault();
243
            sId=this.id.split("_");
244
            sId=sId[1];
245
            $('#edit_dlg').load("/toolbox/getCalcStufe.php?id="+sId).dialog("open");
246
        }
247
        function del_stufe(e)
248
        {
249
            e.preventDefault();
250
            sId=this.id.split("_");
251
            sId=sId[1];
252
            $('#del_stufe_id').html(sId)
253
            $('#del_dlg').dialog("open");
254
        }
255
    </script>
256
    <table class="keinRand" style="width:100%" id="kalkulation">
257
        <thead>
258
            <tr class="links">
259
                <td>ID</td>
260
                <td>Preis von</td>
261
                <td>Preis bis</td>
262
                <td>Multiplikator</td>
263
                <td>Aufschlag</td>
264
                <td>erstellt von</td>
265
                <td>erstellt am</td>
266
                <td>ge&auml;ndert von</td>
267
                <td>ge&auml;ndert am</td>
268
                <td>Aktionen</td>
269
            </tr>
270
        </thead>
271
        {foreach $calc as $art => $stufen}
272
        <tbody>
273
        <tr>
274
            <td colspan="10">{$art}
275
                <button title="Stufe hinzuf&uuml;gen" class="add" id="add__{$art}">&nbsp;</button>
276
            </td>
277
        </tr>
278
        {foreach $stufen as $stufe}
279
        <tr>
280
            <td>{$stufe.id}</td>
281
            <td>{$stufe.preis_von|money_format}</td>
282
            <td>
283
                {if !is_null($stufe.preis_bis)}{$stufe.preis_bis|money_format}{else}unendlich{/if}
284
            </td>
285
            <td>{$stufe.multiplikator}</td>
286
            <td>{$stufe.aufschlag|money_format}</td>
287
            <td>{$stufe.erstellt_von}</td>
288
            <td>{$stufe.erstellt_am|date_format:"%x<br>um %X"}</td>
289
            <td>{$stufe.geaendert_von}</td>
290
            <td>{$stufe.geaendert_am|date_format:"%x<br>um %X"}</td>
291
            <td>
292
                <button title="&auml;ndern" class="edit" id="edit_{$stufe.id}">&nbsp;</button>
293
                <button title="l&ouml;schen" class="del" id="del_{$stufe.id}">&nbsp;</button>
294
            </td>
295
        </tr>
296
        {/foreach}
297
        </tbody>
298
        {/foreach}
299
    </table>
300
 
301
<div id="edit_dlg" title="Preiskalkulationsstufe bearbeiten">
302
</div>
303
 
304
<div id="del_dlg" title="Kalkulationsstufe <span id='del_stufe_id'></span> l&ouml;schen?">
305
    Wollen Sie die Stufe wirklich l&ouml;schen?
306
</div>