-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a menu on left top for session operations
- Loading branch information
Amit Ambardekar
committed
Aug 17, 2010
1 parent
5071902
commit 853a1ff
Showing
16 changed files
with
2,345 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
require_once("framework/request.php"); | ||
require_once("collections/MongoCollectionBase.php"); | ||
|
||
define('ID', '_id'); | ||
define('EMAIL', 'email'); | ||
|
||
define('SUBSCRIBER', 'subscriber'); | ||
|
||
class Subscriber extends MongoCollectionBase | ||
{ | ||
public static function createSubscriberFromRequest() | ||
{ | ||
$newSubscriber = array(EMAIL=>requestParam(EMAIL)); | ||
|
||
return $newSubscriber; | ||
} | ||
|
||
public static function add() | ||
{ | ||
$retval = Subscriber::createSubscriberFromRequest(); | ||
$status = MongoCollectionBase::executeSave($retval, SUBSCRIBER); | ||
|
||
return $retval; | ||
} | ||
|
||
public static function ensureIndex() | ||
{ | ||
MongoCollectionBase::ensureIndexUnique(array(EMAIL=>1),SUBSCRIBER); | ||
} | ||
} | ||
|
||
Subscriber::ensureIndex(); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#addSearchBox{display:none;} | ||
|
||
#subscribeDiv{font-size:20px;width:100%;border:1px solid #888;padding:25px;margin-top:20px;} | ||
#subscribeDiv input,button{height:30px;} | ||
#subscribeDiv #o{width:400px;} | ||
#subscribeDiv button{width:70px;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
var hideDialogFn = function(){} | ||
|
||
function showBackgroundForDialog() | ||
{ | ||
$("#backgroundForDialog").css("display", "block"); | ||
} | ||
|
||
function hideBackgroundForDialog() | ||
{ | ||
$("#backgroundForDialog").css("display", "none");; | ||
} | ||
|
||
function showSessionMenu(sourceElement, eventData) | ||
{ | ||
showBackgroundForDialog(); | ||
|
||
// get sourceElement 's bottom and left | ||
// that is menu's top and left | ||
var offset = $(sourceElement).offset(); | ||
var height = $(sourceElement).height(); | ||
var left = offset.left; | ||
var top = offset.top + height + 4; | ||
|
||
$("#sessionMenu").css("display", "block"); | ||
$("#sessionMenu").css("left", left+"px"); | ||
$("#sessionMenu").css("top", top+"px"); | ||
|
||
$("#sessionMenu a").click(function(){ | ||
hideDialogFn(); | ||
hideBackgroundForDialog() | ||
}); | ||
|
||
hideDialogFn = function() | ||
{ | ||
$("#sessionMenu").css("display", "none"); | ||
}; | ||
} |
Oops, something went wrong.