* Fix user push email config
authorMatt <matt@uncensored.citadel.org>
Sat, 7 Feb 2009 06:42:02 +0000 (06:42 +0000)
committerMatt <matt@uncensored.citadel.org>
Sat, 7 Feb 2009 06:42:02 +0000 (06:42 +0000)
* Roomlist styling fix: neutralize link colors, underline the current room

webcit/pushemail.c
webcit/static/t/pushemail.html
webcit/static/wclib.js
webcit/static/webcit.css

index 2f8c6a13069acaf3b6efac4eda08fb1aea504269..5c55ddc390224c2ae53f7cf32b01acd04f28ab5e 100644 (file)
@@ -11,8 +11,6 @@ void display_pushemail(void) {
        int is_funambol = 0;
        char mobnum[20];
 
-       svput("BOXTITLE", WCS_STRING, _("Push email and SMS settings"));
-       
        /* Find any existing settings*/
        if (goto_config_room() == 0) {
                int msgnum = 0;
@@ -51,6 +49,11 @@ void display_pushemail(void) {
                        }
                }
                }
+               // TODO: do in a saner fashion. 
+               svput("PUSH_NONE", WCS_STRING, " "); // defaults
+               svput("PUSH_TEXT", WCS_STRING, " ");
+               svput("PUSH_FNBL", WCS_STRING, " ");
+               svput("SMSNUM", WCS_STRING, " ");
        if (is_none) {
                svput("PUSH_NONE", WCS_STRING, "checked=\"checked\"");
        } else if (is_pager) {
index 15711e910fe191ed856a92fc163d8514d1445d44..e5db1a53e8da4d2bde12df6dec40d9d0a1296e3d 100644 (file)
@@ -5,7 +5,7 @@
     <div id="content" class="config_service">
     <!-- NOT beginbox -->
     <div class="box">
-    <div class="boxlabel"><?BOXTITLE><?CONTEXTSTR("X")></div>
+    <div class="boxlabel"><?_("Push email and SMS settings")></div>
     <div class="boxcontent">
        <!-- still not begin box -->
     <!-- Begin Push email configure -->
 
         <form id="pushconfig" method="post" action="save_pushemail">
           <p class="option"><input type="radio" name="pushsetting" value=
-          "funambol" <?PUSH_FNBL>><strong>Notify Funambol server</strong></p>
+          "funambol" <?PUSH_FNBL> ><strong>Notify Funambol server</strong></p>
 
           <p class="option"><input type="radio" name="pushsetting" value=
-          "textmessage" <?PUSH_TEXT>><strong>Send a text message</strong> to... <input type="text"
+          "textmessage" <?PUSH_TEXT> ><strong>Send a text message</strong> to... <input type="text"
           name="user_sms_number" size="20" <?SMSNUM> > (Use international format, without any
           leading zeros, spaces or hypens, like +61415011501)</p>
 
           <p class="option"><input type="radio" name="pushsetting" value=
-          "none" <?PUSH_NONE>><strong>Don't send any notifications</strong></p>
+          "none" <?PUSH_NONE> ><strong>Don't send any notifications</strong></p>
 
           <p><input type="submit" name="submit" value="Save settings"></p>
         </form>
index 870ca031d178d7932508e0cc841ab8ac084d53f4..4e2d2976e31c094b12f2bcaa5d599fa46ec96513 100644 (file)
@@ -197,6 +197,10 @@ function switch_to_menu_buttons() {
 }
 function IconBarRoomList() {
   var currentExpanded = ctdlLocalPrefs.readPref("rooms_expanded");
+  var curRoomName = "";
+  if (document.getElementById("rmname")) {
+    curRoomName = getTextContent(document.getElementById("rmname"));
+  }
   currentDropTargets = new Array();
   var iconbar = document.getElementById("iconbar");
   roomlist = document.getElementById("roomlist");
@@ -216,7 +220,7 @@ function IconBarRoomList() {
   var mailboxRooms = GetMailboxRooms();
   for(var i=0; i<mailboxRooms.length; i++) {
     var room = mailboxRooms[i];
-    currentDropTargets.push(addRoomToList(mailboxUL, room));
+    currentDropTargets.push(addRoomToList(mailboxUL, room, curRoomName));
   }
   if (currentExpanded != null && currentExpanded == _mailbox ) {
     expandFloor(mailboxSPAN);
@@ -237,7 +241,7 @@ function IconBarRoomList() {
     var roomsForFloor = GetRoomsByFloorNum(floornum);
     for(var b=0; b<roomsForFloor.length; b++) {
       var room = roomsForFloor[b];
-      currentDropTargets.push(addRoomToList(floorUL, room));
+      currentDropTargets.push(addRoomToList(floorUL, room, curRoomName));
     }
     if (currentExpanded != null && currentExpanded == name) {
       expandFloor(floorSPAN);
@@ -245,7 +249,7 @@ function IconBarRoomList() {
   }
 }
 
-function addRoomToList(floorUL,room) {
+function addRoomToList(floorUL,room, roomToEmphasize) {
   var roomName = room[RN_ROOM_NAME];
   var flag = room[RN_ROOM_FLAG];
   var curView = room[RN_CUR_VIEW];
@@ -275,6 +279,9 @@ function addRoomToList(floorUL,room) {
   if (hasNewMsgs) {
     className += " room-newmsgs";
   }
+  if (roomName == roomToEmphasize) {
+    className += " room-emphasized";
+  }
   roomLI.setAttribute("class", className);
   roomA.dropTarget = true;
   roomA.dropHandler = roomListDropHandler;
index 91ea445fa13435ec07d62e01ac298ab587fdda3e..915b21a05bd4f6d2bb824a62b440c683242fc8c8 100644 (file)
@@ -886,7 +886,8 @@ body, #global {
     padding: 0;
 }
 /** Override to disable list-style-image" */
-.room {
+.room a, .room a, .room a:visited, .room a:link {
+    color: #333333;
 }
 .room-private {
     list-style-image: url("/static/privatemess_16x.gif");
@@ -909,6 +910,9 @@ body, #global {
 .room-newmsgs {
     font-weight: bold;
 }
+.room-emphasized {
+    text-decoration: underline;
+}
 /* Content */
 
 .boxcontent table {