Subversion-Projekte lars-tiefland.ci

Revision

Revision 945 | Revision 947 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
875 lars 1
    $(function(){
2
        $('.add_image').button({
3
            icons:{
4
                primary:'ui-icon-plus'
5
            }
6
        }).click(add_images);
7
        $('.add_folder').button({
8
            icons:{
9
                primary:'ui-icon-plus'
10
            }
11
        }).click(add_folder);
12
        $('.del_image').button({
13
            icons:{
14
                primary:'ui-icon-trash'
15
            }
16
        });
17
 
18
        $('.search').button({
19
            icons:{
20
                primary: "ui-icon-search"
21
            }
22
        }).click(search);
23
 
24
        $('#upload_dlg .nav').css("cursor","pointer").click(nav);
25
 
26
        function nav()
27
        {
28
            f_name=$(this).attr("data-fname");
29
            l_id=$('#lID').val();
30
            l_type=$('#lType').val();
31
            $('#upload_dlg').load("/Online-Shop/upload.php?folder="+f_name+"&l_type="+l_type+"&l_id="+l_id);
32
        }
33
 
34
        $('#upload_dlg').dialog({
35
            autoOpen: false,
36
            modal:true,
37
            width:"95%",
38
            height:600,
39
            resizable:false,
40
            close:function(){
41
                l_id=$('#lID').val();
42
                l_type=$('#lType').val();
43
                $('#bildverwaltung').load("/Online-Shop/bilder.php?l_id="+l_id+"&l_type="+l_type);
44
            },
45
            buttons:{
46
                "Abbrechen":function()
47
                {
48
                    l_id=$('#lID').val();
49
                    l_type=$('#lType').val();
50
                    $('#bildverwaltung').load("/Online-Shop/bilder.php?l_id="+l_id+"&l_type="+l_type);
878 lars 51
                    $('#upload_dlg').dialog("close");
875 lars 52
                }
53
            }
54
        });
55
 
56
        $('#folder_dialog').dialog({
57
            autoOpen:false,
58
            modal:true,
59
            width:800,
60
            resizable:false,
61
            buttons:{
62
                "Ordner anlegen":function(){
907 lars 63
                    $.post("/backend/toolbox/mkdir/",$('#create_folder').serializeArray(),function(html){
875 lars 64
                        //alert(html);
65
                    });
878 lars 66
                    $('#folder_dialog').dialog("close");
875 lars 67
                },
68
                "Abbruch": function(){
878 lars 69
                    $('#folder_dialog').dialog("close");
875 lars 70
                }
71
            }
72
        })
73
 
74
        function search(e)
75
        {
76
            e.preventDefault();
77
            $('#search_media').submit();
78
        }
79
 
80
        function add_images(e)
81
        {
82
            e.preventDefault();
83
            $('#upload_dlg').dialog('open');
84
        }
85
 
86
        function add_folder(e)
87
        {
88
            e.preventDefault();
89
            $('#folder_dialog').dialog("open");
90
        }
91
        $('#taskResult').dialog({
92
            width:800,
93
            autoOpen:false,
94
            modal:true,
95
            resizable:false,
96
            buttons:[{
97
                text:"OK",
98
                icons: {
99
                    primary: "ui-icon-check"
100
                },
101
                showText: false,
102
                click:function()
103
                {
104
                    $('#taskResult').dialog("close");
945 lars 105
                    document.location.reload();
875 lars 106
                }
107
            }]
108
        });
109
        $('#taskForm').dialog({
110
            width:800,
111
            //height:600,
112
            autoOpen:false,
113
            modal:true,
114
            resizable:false,
115
            buttons:[{
116
                text:"speichern",
117
                icons: {
118
                    primary: "ui-icon-check"
119
                },
120
                showText: false,
121
                click:function()
122
                {
942 lars 123
                    $('#taskResult').load("/backend/scheduler/save/",$('#scheduler_form').serializeArray(),function(){
875 lars 124
                        $('#taskResult').dialog("open");
125
                    })
126
                    $('#taskForm').dialog("close");
946 lars 127
                    document.location.reload();
875 lars 128
                }
129
            },
130
            {
131
                text:"verwerfen",
132
                icons: {
133
                    primary: "ui-icon-close"
134
                },
135
                showText: false,
136
                click:function(){
878 lars 137
                    $('#taskForm').dialog("close");
875 lars 138
                }
139
            }]
140
        })
141
/*        $( "#taskForm" ).dialog({
142
          buttons: [
143
            {
144
              text: "speicehrn",
145
              icons: {
146
                primary: "ui-icon-heart"
147
              },
148
              click: function() {
149
                $( this ).dialog( "close" );
150
              }
151
 
152
              // Uncommenting the following line would hide the text,
153
              // resulting in the label being used as a tooltip
154
            }
155
          ]
156
        });*/
157
        $('.task_edit').click(edit_task);
158
        $('.newTask').click(newTask);
159
    });
160
 
161
    function newTask(e)
162
    {
163
        e.preventDefault();
907 lars 164
        url="/backend/scheduler/edit/";
875 lars 165
        $.get(url,function(html)
166
        {
167
            $('#taskForm').html(html).dialog("open");
168
        });
169
    }
170
    function edit_task(e)
171
    {
172
        e.preventDefault();
173
        tIdArr=$(this).attr("id").split("_");
174
        tId=tIdArr[1];
907 lars 175
        url="/backend/scheduler/edit/"+tId;
875 lars 176
        $.get(url,function(html)
177
        {
178
            $('#taskForm').html(html).dialog("open");
179
        });
180
    }