[phpwebapp-commits] CVS: top10/templates/proj_list/footer list_footer.php,1.2,1.3 list_footer.js,1.4
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2003-10-02 07:09:46
|
Update of /cvsroot/phpwebapp/top10/templates/proj_list/footer
In directory sc8-pr-cvs1:/tmp/cvs-serv5584/templates/proj_list/footer
Modified Files:
list_footer.php list_footer.js list_footer.html list_footer.db
Log Message:
Index: list_footer.php
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/footer/list_footer.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** list_footer.php 30 Sep 2003 10:24:22 -0000 1.2
--- list_footer.php 2 Oct 2003 07:09:40 -0000 1.3
***************
*** 45,49 ****
$selected = $event_args["selected"];
$params = array("selected_projects" => $this->reformat($selected));
! WebApp::execDBCmd("delete", $params);
WebApp::setSVar("proj_list_rs->recount", "true");
}
--- 45,52 ----
$selected = $event_args["selected"];
$params = array("selected_projects" => $this->reformat($selected));
! WebApp::execDBCmd("del_projects", $params);
! WebApp::execDBCmd("del_comments", $params);
! WebApp::execDBCmd("del_members", $params);
! WebApp::execDBCmd("del_evaluations", $params);
WebApp::setSVar("proj_list_rs->recount", "true");
}
***************
*** 64,68 ****
WebApp::execDBCmd("approve_all");
! WebApp::setSVar("proj_list->status", "approved");
WebApp::setSVar("proj_list_rs->recount", "true");
}
--- 67,71 ----
WebApp::execDBCmd("approve_all");
! WebApp::setSVar("filter->new", "false");
WebApp::setSVar("proj_list_rs->recount", "true");
}
Index: list_footer.js
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/footer/list_footer.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** list_footer.js 30 Sep 2003 10:24:22 -0000 1.4
--- list_footer.js 2 Oct 2003 07:09:40 -0000 1.5
***************
*** 52,56 ****
if (selected=="")
{
! alert("Nothing Selected!");
return;
}
--- 52,56 ----
if (selected=="")
{
! alert("Nothing selected!");
return;
}
***************
*** 78,85 ****
if (selected=="")
{
! alert("Nothing Selected");
return;
}
! SendEvent("list_footer", "edit", "selected="+selected);
}
--- 78,94 ----
if (selected=="")
{
! alert("Nothing selected!");
return;
}
!
! //check that there is selected only one project
! var arr_selected = selected.split(',');
! if (arr_selected.length > 1)
! {
! alert("Please select only one project.");
! return;
! }
!
! SendEvent("module", "edit_project", "proj_id="+selected);
}
***************
*** 90,96 ****
if (selected=="")
{
! alert("Nothing Selected");
return;
}
SendEvent("list_footer", "delete", "selected="+selected);
}
--- 99,108 ----
if (selected=="")
{
! alert("Nothing selected!");
return;
}
+ var msg = "Are you sure you want to delete "
+ + "the project(s): '" + selected + "' ?";
+ if (!confirm(msg)) return;
SendEvent("list_footer", "delete", "selected="+selected);
}
***************
*** 102,106 ****
if (selected=="")
{
! alert("Nothing Selected");
return;
}
--- 114,118 ----
if (selected=="")
{
! alert("Nothing selected!");
return;
}
Index: list_footer.html
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/footer/list_footer.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** list_footer.html 30 Sep 2003 10:24:22 -0000 1.4
--- list_footer.html 2 Oct 2003 07:09:40 -0000 1.5
***************
*** 29,34 ****
<a class="button" href="javascript:edit_selected()">Edit</a>
<a class="button" href="javascript:del_selected()">Delete</a>
! <a class="button" href="javascript:approve_selected()">Approve</a>
! <a class="button" href="javascript:approve_all()">Approve All</a>
</If>
<If condition="'{{ADMIN}}'!='true'">
--- 29,36 ----
<a class="button" href="javascript:edit_selected()">Edit</a>
<a class="button" href="javascript:del_selected()">Delete</a>
! <If condition="'{{filter->new}}'=='true'">
! <a class="button" href="javascript:approve_selected()">Approve</a>
! <a class="button" href="javascript:approve_all()">Approve All</a>
! </If>
</If>
<If condition="'{{ADMIN}}'!='true'">
Index: list_footer.db
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/proj_list/footer/list_footer.db,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** list_footer.db 30 Sep 2003 10:24:22 -0000 1.2
--- list_footer.db 2 Oct 2003 07:09:40 -0000 1.3
***************
*** 1,11 ****
<!--# -*-SQL-*- #tell emacs to use SQL mode #-->
- <dbCommand ID="delete">
- <Query>
- DELETE FROM proj_list
- WHERE proj_id IN ({{selected_projects}})
- </Query>
- </dbCommand>
-
<dbCommand ID="approve">
<Query>
--- 1,4 ----
***************
*** 21,24 ****
--- 14,42 ----
SET status = 'approved'
WHERE status = 'new'
+ </Query>
+ </dbCommand>
+
+ <dbCommand ID="del_projects">
+ <Query>
+ DELETE FROM proj_list
+ WHERE proj_id IN ({{selected_projects}})
+ </Query>
+ </dbCommand>
+ <dbCommand ID="del_comments">
+ <Query>
+ DELETE FROM comments
+ WHERE proj_id IN ({{selected_projects}})
+ </Query>
+ </dbCommand>
+ <dbCommand ID="del_members">
+ <Query>
+ DELETE FROM proj_members
+ WHERE proj_id IN ({{selected_projects}})
+ </Query>
+ </dbCommand>
+ <dbCommand ID="del_evaluations">
+ <Query>
+ DELETE FROM preference_list
+ WHERE proj_id IN ({{selected_projects}})
</Query>
</dbCommand>
|