diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-08-17 15:52:44 -0400 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-08-17 15:52:44 -0400 |
commit | 00586f1e8ada8f5baa6e3013525862dccac77b4a (patch) | |
tree | 8c456facf829646386ee039622e2df16140bcca8 /theme/admin | |
parent | 49ff543541097a514cf8c836b74cd9514df2bf98 (diff) | |
download | fourisland-00586f1e8ada8f5baa6e3013525862dccac77b4a.tar.gz fourisland-00586f1e8ada8f5baa6e3013525862dccac77b4a.tar.bz2 fourisland-00586f1e8ada8f5baa6e3013525862dccac77b4a.zip |
Added new files from previous commit
Diffstat (limited to 'theme/admin')
-rw-r--r-- | theme/admin/links.tpl | 94 | ||||
-rw-r--r-- | theme/admin/writeLink.tpl | 53 |
2 files changed, 147 insertions, 0 deletions
diff --git a/theme/admin/links.tpl b/theme/admin/links.tpl new file mode 100644 index 0000000..d666f61 --- /dev/null +++ b/theme/admin/links.tpl | |||
@@ -0,0 +1,94 @@ | |||
1 | <h2><!--TITLE--></h2> | ||
2 | |||
3 | <div class="clear"></div> | ||
4 | |||
5 | <script type="text/javascript"> | ||
6 | function deleteLink(id) | ||
7 | { | ||
8 | if (confirm("Are you sure you would like to delete this link?")) | ||
9 | { | ||
10 | postwith("/admin/links.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
11 | } | ||
12 | } | ||
13 | |||
14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
15 | function postwith (to,p) { | ||
16 | var myForm = document.createElement("form"); | ||
17 | myForm.method="post" ; | ||
18 | myForm.action = to ; | ||
19 | for (var k in p) { | ||
20 | var myInput = document.createElement("input") ; | ||
21 | myInput.setAttribute("name", k) ; | ||
22 | myInput.setAttribute("value", p[k]); | ||
23 | myForm.appendChild(myInput) ; | ||
24 | } | ||
25 | document.body.appendChild(myForm) ; | ||
26 | myForm.submit() ; | ||
27 | document.body.removeChild(myForm) ; | ||
28 | } | ||
29 | |||
30 | function bulkAction() | ||
31 | { | ||
32 | var bulk=new Array(); | ||
33 | $(".the-check:checked").each(function() { | ||
34 | bulk.push($(this).val()); | ||
35 | }); | ||
36 | var ids = bulk.join(",") | ||
37 | |||
38 | if (ids != "") | ||
39 | { | ||
40 | if ($('#manage-bulk select').val() == "delete") | ||
41 | { | ||
42 | if (confirm("Are you sure you would like to delete the selected links?")) | ||
43 | { | ||
44 | postwith("/admin/links.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
45 | } | ||
46 | } | ||
47 | } | ||
48 | } | ||
49 | |||
50 | $(document).ready(function() { | ||
51 | $("input#all-check").click(function() { | ||
52 | var what = this.checked; | ||
53 | $("input.the-check").each(function() { | ||
54 | this.checked = what; | ||
55 | }); | ||
56 | }); | ||
57 | }); | ||
58 | </script> | ||
59 | |||
60 | <!--BEGIN AVAIL--> | ||
61 | <div id="manage-options"> | ||
62 | <div id="manage-bulk"> | ||
63 | <select name="bulk-type"> | ||
64 | <option value="delete">Delete</option> | ||
65 | </select> | ||
66 | |||
67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
68 | </div> | ||
69 | </div> | ||
70 | |||
71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
72 | |||
73 | <table> | ||
74 | <tr class="table-header"> | ||
75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
76 | <td>Post Name</td> | ||
77 | <td colspan="3">Actions</td> | ||
78 | </tr> | ||
79 | <!--BEGIN LINK--> | ||
80 | <tr<!--LINK.ODD-->> | ||
81 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--LINK.ID-->" /></td> | ||
82 | <td><!--LINK.TITLE--></td> | ||
83 | <td class="table-img"><a href="/admin/editLink.php?id=<!--LINK.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
84 | <td class="table-img"><a href="#" onclick="deleteLink(<!--LINK.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
85 | <td class="table-img"><a href="<!--LINK.URL-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
86 | </tr> | ||
87 | <!--END LINK--> | ||
88 | </table> | ||
89 | |||
90 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
91 | <!--END AVAIL--> | ||
92 | <!--BEGIN NOTAVAIL--> | ||
93 | <div class="manage-pagination">There are no links.</div> | ||
94 | <!--END NOTAVAIL--> | ||
diff --git a/theme/admin/writeLink.tpl b/theme/admin/writeLink.tpl new file mode 100644 index 0000000..9cb1d1a --- /dev/null +++ b/theme/admin/writeLink.tpl | |||
@@ -0,0 +1,53 @@ | |||
1 | <h2><!--TITLE--></h2> | ||
2 | |||
3 | <form action="<!--ACTION-->" method="post" class="uniForm"> | ||
4 | <!--BEGIN ISERROR--> | ||
5 | <div id="errorMsg"> | ||
6 | <h3>Oops! There was an error!</h3> | ||
7 | |||
8 | <ol> | ||
9 | <!--BEGIN ERROR--> | ||
10 | <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li> | ||
11 | <!--END ERROR--> | ||
12 | </ol> | ||
13 | </div> | ||
14 | <!--END ISERROR--> | ||
15 | |||
16 | <!--BEGIN FLASH--> | ||
17 | <div id="OKMsg"><p><!--FLASH.TEXT--></p></div> | ||
18 | <!--END FLASH--> | ||
19 | |||
20 | <fieldset class="inlineLabels"> | ||
21 | <div class="ctrlHolder<!--ISTITLEERROR-->"> | ||
22 | <!--BEGIN TITLEERROR--> | ||
23 | <p id="error<!--TITLEERROR.ID-->" class="errorField"><strong><!--TITLEERROR.TEXT--></strong></p> | ||
24 | <!--END TITLEERROR--> | ||
25 | <label for="title">Title</label> | ||
26 | <input type="text" name="title" id="title" value="<!--TITLEVALUE-->" /> | ||
27 | </div> | ||
28 | |||
29 | <div class="ctrlHolder<!--ISURLERROR-->"> | ||
30 | <!--BEGIN URLERROR--> | ||
31 | <p id="error<!--URLERROR.ID-->" class="errorField"><strong><!--URLERROR.TEXT--></strong></p> | ||
32 | <!--END URLERROR--> | ||
33 | <label for="url">URL</label> | ||
34 | <input type="text" name="url" id="url" value="<!--URLVALUE-->" /> | ||
35 | </div> | ||
36 | |||
37 | <div class="ctrlHolder<!--ISTYPEERROR-->"> | ||
38 | <!--BEGIN TYPEERROR--> | ||
39 | <p id="error<!--TYPEERROR.ID-->" class="errorField"><strong><!--TYPEERROR.TEXT--></strong></p> | ||
40 | <!--END TYPEERROR--> | ||
41 | <p class="label"><em>*</em> Link Type</p> | ||
42 | <div class="multiField"> | ||
43 | <label for="type_affiliates" class="inlineLabel"><input name="type" id="type_affiliates" value="affiliates" type="radio"<!--AFFILIATESSELECTED--><!--TYPEDISABLED--> /> Affiliates</label> | ||
44 | <label for="type_webprojs" class="inlineLabel"><input name="type" id="type_webprojs" value="webprojs" type="radio"<!--WEBPROJSSELECTED--><!--TYPEDISABLED--> /> Website Projects</label> | ||
45 | </div> | ||
46 | </div> | ||
47 | </fieldset> | ||
48 | |||
49 | <div class="buttonHolder"> | ||
50 | <button type="reset" class="resetButton">Reset</button> | ||
51 | <button type="submit" class="primaryAction">Submit</button> | ||
52 | </div> | ||
53 | </form> | ||