From f18d22b4586665eda9096b94624d461b08c18c39 Mon Sep 17 00:00:00 2001
From: Seth Meranda <smeranda2@unl.edu>
Date: Thu, 30 Sep 2010 21:31:55 +0000
Subject: [PATCH] revamp the mobile presence to take advantage of new login
 markup. Clean up all the missused functions.

---
 plugins/mobile_unl/start.php                  |   3 +-
 .../views/mobile/mobile_unl/css.php           | 103 +++++++++++++-----
 .../views/mobile/mobile_unl/prMobile.js       |   7 ++
 .../views/mobile/pageshells/pageshell.php     |   9 +-
 4 files changed, 92 insertions(+), 30 deletions(-)
 create mode 100644 plugins/mobile_unl/views/mobile/mobile_unl/prMobile.js

diff --git a/plugins/mobile_unl/start.php b/plugins/mobile_unl/start.php
index 7e31be9b..5184a0b2 100755
--- a/plugins/mobile_unl/start.php
+++ b/plugins/mobile_unl/start.php
@@ -12,7 +12,8 @@
 
 	function mobile_unl_init(){
 		
-		extend_view('css', 'mobile_unl/css'); 
+		extend_view('css', 'mobile_unl/css');
+		elgg_extend_view('js/initialise_elgg','mobile_unl/js'); 
  
     }
 // Initialise log browser
diff --git a/plugins/mobile_unl/views/mobile/mobile_unl/css.php b/plugins/mobile_unl/views/mobile/mobile_unl/css.php
index 55428b3f..a6a6947d 100644
--- a/plugins/mobile_unl/views/mobile/mobile_unl/css.php
+++ b/plugins/mobile_unl/views/mobile/mobile_unl/css.php
@@ -3,42 +3,89 @@
 	//This file is called in /mod/mobile_unl/start.php in the mobile_unl plugin initialization function
 
 ?>
-
-
+#footer {display:none;}
+.mobilecopy {
+	margin-top:15px;
+	border-top:1px solid #DFDEDE;
+}
 <?php //Login ?>
-#login a.wdn_loginLink {
-	font-size:1.8em;
-	text-decoration:none;
-	margin-left:60px;
-	padding-bottom:15px;
-	padding-top:33px;
+#casOption {
+	display:block;
+	padding:5px 0;
+	width:100%;
 }
-
-#login a.wdn_loginLink span {
-	background:url("<?php echo $vars['url'];?>mod/unl_theme/views/default/images/wdn_notice_ActionBG.png") no-repeat;
+#casLogin, #actionBar .submit_button {
+	padding:15px;
+	font-size:1.6em;
+	font-weight:bold;
+	background:#90C048;
+	background-image:-webkit-gradient(
+		linear,
+		left top,
+		left bottom,
+		color-stop(0.39, rgb(144,192,72)),
+		color-stop(0.75, rgb(120,168,48))
+	);
+	border-radius:5px;
+	-webkit-border-radius:5px;
+	margin:0;
+	display:inline-block;
+	float:left;
+}
+#actionBar .submit_button {
+	padding:2px 5px;
+	font-size:1.2em;
+	width:75px;
+}
+#maincontent #casLogin {color:#fff;}
+#actionBar #casOption span {
+	font-weight:bold;
+	text-transform:uppercase;
+}
+#casOption .loginMessage {
+	float:left;
+	margin-left:10px;
+	margin-top:5px;
+}
+#elggOption {
+	display:block;
+	clear:both;
+	float:left;
+	margin-top:15px;
+}
+#actionBar #elggOption ul {
+	padding:0px;
+	list-style:none;
+	margin-top:15px;
+}
+#actionBar #elggOption  ul li {
 	display:inline;
-	height:45px;
-	padding:9px 50px 15px 20px;
-	width:167px;
-	color:white !important;
 }
-
-#login div.two_col {
-	background:none repeat scroll 0 0 #F7F7F7;
-	border:1px solid #EDEDED;
-	margin-bottom:1em;
+#actionBar #elggOption  ul li a {
 	padding:5px;
+	color:#D8D8D8;
+	background:#6f6f6f;
+	border-radius:3px;
+	-webkit-border-radius:3px;
+	text-transform:uppercase;
+	font-weight:bold;
+	font-size:0.8em;
 }
-
-#login p.login-box label{
-	font-size:1em;
+.elggLoginForm {
+	margin-top:15px;
 }
-
-#login input.login-textarea {
-	width:90%;
-	font-size:1.2em;
+.elggLoginForm label{
+	font-size:100%;
+	display:block;
+}
+.elggLoginForm ul {
+	clear:both;
+	margin:10px 0;
+	float:left;
+}
+#owner_block_bottom {
+	clear:both;
 }
-
 <?php //Home ?>
 
 #river {
diff --git a/plugins/mobile_unl/views/mobile/mobile_unl/prMobile.js b/plugins/mobile_unl/views/mobile/mobile_unl/prMobile.js
new file mode 100644
index 00000000..6001e6fa
--- /dev/null
+++ b/plugins/mobile_unl/views/mobile/mobile_unl/prMobile.js
@@ -0,0 +1,7 @@
+$(document).ready(function(){
+	$('.elggLoginForm').hide();
+	$('a.switchAction').click(function(){
+		$('.elggLoginForm').slideToggle();
+		return false;
+	})
+});
\ No newline at end of file
diff --git a/plugins/mobile_unl/views/mobile/pageshells/pageshell.php b/plugins/mobile_unl/views/mobile/pageshells/pageshell.php
index 28ed2bb1..af65a9be 100755
--- a/plugins/mobile_unl/views/mobile/pageshells/pageshell.php
+++ b/plugins/mobile_unl/views/mobile/pageshells/pageshell.php
@@ -38,7 +38,14 @@ $page = UNL_Templates::factory('Mobile');
 $page->doctitle = '<title>'.$vars['title'].'</title>';
 $page->titlegraphic = '<h1><a href="'.$vars['config']->url.'" title="Planet Red Home">'.$vars['config']->sitename.'</a></h1>';
 $page->head .= '<link rel="stylesheet" href="' . $vars['url'] .'_css/css.css?lastcache='.$vars['config']->lastcache.'>&amp;viewtype=mobile&view=mobile" type="text/css" />';
-
+$page->head .= '<script src="http://www.google.com/jsapi?key=ABQIAAAAwe1KxJQmdsBUA9Mt6kzATRTiIXXUG0D2APo0gbOVrrcYFR1BiRQFxzzCOWOXtlPqB8ZjQRcBMaFaOA" type="text/javascript"></script>';
+$page->head .= '
+<script language="Javascript" type="text/javascript">
+//<![CDATA[
+	google.load("jquery", "1.4.2");
+//]]>
+</script>';
+$page->head .= '<script type="text/javascript" src="'.$vars['url'].'mod/mobile_unl/views/mobile/mobile_unl/prMobile.js"></script>';
 
 $page->maincontentarea = "";
 
-- 
GitLab