BUG 0000 User Inbox Simplified (6th commit)
This commit is contained in:
115
gulliver/js/jquery/xbreadcrumbs.js
vendored
Normal file
115
gulliver/js/jquery/xbreadcrumbs.js
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
xBreadcrumbs (Extended Breadcrums) jQuery Plugin
|
||||
© 2009 ajaxBlender.com
|
||||
For any questions please visit www.ajaxblender.com
|
||||
or email us at support@ajaxblender.com
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adapted by Erik Amaru Ortiz <erik@colosa.com>
|
||||
* on 2th Feb, 2012
|
||||
*/
|
||||
|
||||
;(function($){
|
||||
/* Variables */
|
||||
$.fn.xBreadcrumbs = function(settings){
|
||||
var element = $(this);
|
||||
var settings = $.extend({}, $.fn.xBreadcrumbs.defaults, settings);
|
||||
|
||||
function _build(){
|
||||
if(settings.collapsible){
|
||||
var sz = element.children('LI').length;
|
||||
element.children('LI').children('A').css('white-space', 'nowrap').css('float', 'left');
|
||||
|
||||
element.children('LI').children('A').each(function(i, el){
|
||||
//if(i != sz - 1){
|
||||
$(this).css('overflow', 'hidden');
|
||||
$(this).attr('init-width', $(this).width());
|
||||
if (i!=0)
|
||||
$(this).width(settings.collapsedWidth);
|
||||
//}
|
||||
});
|
||||
}
|
||||
|
||||
element.children('LI').click(function(){
|
||||
|
||||
$('.xbreadcrumbs').children('LI').attr('class', '');
|
||||
$(this).attr('class', 'current');
|
||||
|
||||
$('.xbreadcrumbs').children('LI[class!=current]').children('A').animate({width: settings.collapsedWidth}, 'fast');
|
||||
});
|
||||
|
||||
element.children('LI').mouseenter(function(){
|
||||
if(settings.collapsible && !$(this).hasClass('current')){
|
||||
var initWidth = $(this).children('A').attr('init-width');
|
||||
$(this).children('A').animate({width: initWidth}, 'normal');
|
||||
}
|
||||
|
||||
if($(this).hasClass('hover')){ return; }
|
||||
|
||||
_hideAllSubLevels();
|
||||
if(!_subLevelExists($(this))){ return; }
|
||||
|
||||
// Show sub-level
|
||||
var subLevel = $(this).children('UL');
|
||||
_showHideSubLevel(subLevel, true);
|
||||
|
||||
|
||||
});
|
||||
|
||||
element.children('LI').mouseleave(function(){
|
||||
var subLevel = $(this).children('UL');
|
||||
_showHideSubLevel(subLevel, false);
|
||||
|
||||
if(settings.collapsible && !$(this).hasClass('current')){
|
||||
$(this).children('A').animate({width: settings.collapsedWidth}, 'fast');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function _hideAllSubLevels(){
|
||||
element.children('LI').children('UL').each(function(){
|
||||
$(this).hide();
|
||||
$(this).parent().removeClass('hover');
|
||||
});
|
||||
};
|
||||
|
||||
function _showHideSubLevel(subLevel, isShow){
|
||||
if(isShow){
|
||||
subLevel.parent().addClass('hover');
|
||||
if($.browser.msie){
|
||||
var pos = subLevel.parent().position();
|
||||
subLevel.css('left', parseInt(pos['left']));
|
||||
}
|
||||
if(settings.showSpeed != ''){ subLevel.fadeIn( settings.showSpeed ); }
|
||||
else { subLevel.show(); }
|
||||
} else {
|
||||
subLevel.parent().removeClass('hover');
|
||||
if(settings.hideSpeed != ''){ subLevel.fadeOut( settings.hideSpeed ); }
|
||||
else { subLevel.hide(); }
|
||||
}
|
||||
};
|
||||
|
||||
function _subLevelExists(obj){
|
||||
return obj.children('UL').length > 0;
|
||||
};
|
||||
|
||||
// Entry point
|
||||
_build();
|
||||
|
||||
|
||||
//$('.xbreadcrumbs').children('LI[class=current]').click();
|
||||
//var initWidth = $('.xbreadcrumbs').children('LI[class=current]').width();
|
||||
//alert(initWidth);
|
||||
//$('.xbreadcrumbs').children('LI[class=current]').animate({width: initWidth}, 'normal');
|
||||
};
|
||||
|
||||
/* Default Settings */
|
||||
$.fn.xBreadcrumbs.defaults = {
|
||||
showSpeed: 'fast',
|
||||
hideSpeed: '',
|
||||
collapsible: false,
|
||||
collapsedWidth: 10,
|
||||
start: 1
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -245,6 +245,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
switch ($uxType) {
|
||||
case 'SIMPLIFIED':
|
||||
case 'SWITCHABLE':
|
||||
case 'SINGLE':
|
||||
$_SESSION['user_experience'] = $uxType;
|
||||
return '/sys' . SYS_SYS . '/' . $sLanguage . '/' . SYS_SKIN . '/' . 'home';
|
||||
break;
|
||||
|
||||
@@ -69,14 +69,16 @@ class adminProxy extends HttpProxyController
|
||||
$list = array(
|
||||
'NORMAL' => 'Normal',
|
||||
'SIMPLIFIED' => 'Simplified',
|
||||
'SWITCHABLE' => 'Switchable'
|
||||
'SWITCHABLE' => 'Switchable'/*,
|
||||
'SINGLE' => 'Single Application'*/
|
||||
);
|
||||
}
|
||||
else {
|
||||
$list = array(
|
||||
array('NORMAL', 'Normal'),
|
||||
array('SIMPLIFIED', 'Simplified'),
|
||||
array('SWITCHABLE', 'Switchable')
|
||||
array('SWITCHABLE', 'Switchable')/*,
|
||||
array('SINGLE', 'Single Application')*/
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,14 @@ class Home extends Controller
|
||||
$processList = $case->getStartCasesPerType ( $_SESSION ['USER_LOGGED'], 'category' );
|
||||
unset($processList[0]);
|
||||
|
||||
if ($this->userUxType == 'SINGLE') {
|
||||
$this->setView('home/index2');
|
||||
}
|
||||
else {
|
||||
$this->setView('home/index');
|
||||
}
|
||||
|
||||
|
||||
$this->setVar('usrUid', $this->userID);
|
||||
$this->setVar('userName', $this->userName);
|
||||
$this->setVar('processList', $processList);
|
||||
|
||||
@@ -186,3 +186,141 @@
|
||||
font-size: 1p1x;
|
||||
margin: 10px 0px 0px 0px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
xBreadcrumbs (Extended Breadcrumbs) jQuery Plugin
|
||||
© 2009 ajaxBlender.com
|
||||
For any questions please visit www.ajaxblender.com
|
||||
or email us at support@ajaxblender.com
|
||||
*/
|
||||
|
||||
.xbreadcrumbs {
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
.xbreadcrumbs LI UL {
|
||||
position: absolute;
|
||||
float: left;
|
||||
}
|
||||
.xbreadcrumbs, .xbreadcrumbs LI, .xbreadcrumbs UL, .xbreadcrumbs UL LI {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.xbreadcrumbs { clear: both; }
|
||||
.xbreadcrumbs, .xbreadcrumbs LI {
|
||||
float: left;
|
||||
}
|
||||
.xbreadcrumbs UL {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Base style of xBreadcrumbs */
|
||||
/* Top Level */
|
||||
.xbreadcrumbs {
|
||||
background: #F0F0F0;
|
||||
width: 100%;
|
||||
}
|
||||
.xbreadcrumbs LI {
|
||||
padding: 5px;
|
||||
border-right: 1px solid #CECECE;
|
||||
height: 16px;
|
||||
}
|
||||
.xbreadcrumbs LI.current {
|
||||
border-right: none;
|
||||
}
|
||||
.xbreadcrumbs LI A {
|
||||
font-size: 11px;
|
||||
color: #666666;
|
||||
text-decoration: none;
|
||||
}
|
||||
.xbreadcrumbs LI A:HOVER, .xbreadcrumbs LI.hover A {
|
||||
color: #0A8ECC;
|
||||
}
|
||||
/* Top Level - Current Page */
|
||||
.xbreadcrumbs LI.current A {
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* Sub-level */
|
||||
.xbreadcrumbs LI UL {
|
||||
padding: 3px;
|
||||
background: #333333;
|
||||
font-size: 11px;
|
||||
width: 180px;
|
||||
top: 25px;
|
||||
}
|
||||
.xbreadcrumbs LI UL LI {
|
||||
float: left;
|
||||
width: 100%;
|
||||
border-right: none;
|
||||
height: auto;
|
||||
}
|
||||
.xbreadcrumbs LI UL LI A {
|
||||
text-decoration: none;
|
||||
color: #CCCCCC !important;
|
||||
display: block;
|
||||
padding: 4px;
|
||||
border-bottom: 1px dotted #666666;
|
||||
}
|
||||
.xbreadcrumbs LI UL LI:last-child A {
|
||||
border-bottom: none;
|
||||
}
|
||||
.xbreadcrumbs LI UL LI A:HOVER {
|
||||
background: #444444;
|
||||
}
|
||||
|
||||
/*******/
|
||||
.xbreadcrumbs LI {
|
||||
border-right: none;
|
||||
background: url(/images/simplified/separator.gif) no-repeat right center;
|
||||
padding-right: 15px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.xbreadcrumbs LI.current {
|
||||
/*background: none;*/
|
||||
background: url(/images/simplified/separator.gif) no-repeat right center;
|
||||
}
|
||||
.xbreadcrumbs LI UL LI { background: none; }
|
||||
|
||||
.xbreadcrumbs LI A.home {
|
||||
background: url(/images/simplified/home.gif) no-repeat left center;
|
||||
padding-left: 20px;
|
||||
/*font-weight: bold;*/
|
||||
}
|
||||
|
||||
/* Custom styles for breadcrums (#breadcrumbs-3) */
|
||||
.xbreadcrumbs#breadcrumbs-3 {
|
||||
background: none;
|
||||
}
|
||||
.xbreadcrumbs#breadcrumbs-3 LI A {
|
||||
text-decoration: underline;
|
||||
color: #0A8ECC;
|
||||
}
|
||||
.xbreadcrumbs#breadcrumbs-3 LI A:HOVER, .xbreadcrumbs#breadcrumbs-3 LI.hover A { text-decoration: none; }
|
||||
.xbreadcrumbs#breadcrumbs-3 LI.current A {
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
}
|
||||
.xbreadcrumbs#breadcrumbs-3 LI {
|
||||
border-right: none;
|
||||
background: url(/images/simplified/separator-arrow.gif) no-repeat right center;
|
||||
padding-right: 15px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.xbreadcrumbs#breadcrumbs-3 LI.current { background: none; }
|
||||
.xbreadcrumbs#breadcrumbs-3 LI UL LI { background: none; padding: 0; }
|
||||
|
||||
|
||||
STRONG { color: #000000; }
|
||||
.vspacer {
|
||||
height: 20px;
|
||||
}
|
||||
PRE.code {
|
||||
padding: 7px;
|
||||
background: #777777;
|
||||
color: #F0F0F0;
|
||||
width: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
for (i=0; i<data.notes.length; i++) {
|
||||
r = data.notes[i];
|
||||
console.log(r);
|
||||
|
||||
s = '<div class="appMessage"><table border="0"><tr>' +
|
||||
'<td width="50" valign="top">'+
|
||||
'<img border="0" src="../users/users_ViewPhotoGrid?pUID='+r.USR_UID+'" width="40" height="40"/>' +
|
||||
@@ -105,7 +105,7 @@
|
||||
'<p><pre>'+r.NOTE_CONTENT+'</pre>' +
|
||||
'<div class="appMessageDate">Posted at '+r.NOTE_DATE+'</div>' +
|
||||
'</td></tr></table></div>';
|
||||
console.log(s);
|
||||
|
||||
content.append(s);
|
||||
$('#n_'+appUid).show('slow');
|
||||
}
|
||||
@@ -124,12 +124,12 @@
|
||||
success: function(html){
|
||||
appListStart += appListLimit;
|
||||
|
||||
if(html){
|
||||
if(jQuery.trim(html) != ''){
|
||||
$("#commentlist").append(html);
|
||||
$('#loadmorebutton').html('Load More');
|
||||
}
|
||||
else {
|
||||
$('#loadmorebutton').replaceWith('<center>No more posts to show.</center>');
|
||||
$('#loadmorebutton').replaceWith('<center>No more applications to show.</center>');
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -154,9 +154,11 @@
|
||||
{include file='home/applications.html'}
|
||||
</ul>
|
||||
|
||||
{if $cases_count > $appListLimit}
|
||||
<center>
|
||||
<a href="#" style="color:#1F98C7; font-size:12px; font-weight:bold;" id="loadmorebutton">Load More</a>
|
||||
</center>
|
||||
{/if}
|
||||
</div>
|
||||
</center>
|
||||
|
||||
|
||||
@@ -72,13 +72,14 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{if $canStartCase neq false}
|
||||
<li class="account">
|
||||
<a class="menu user-actions" href="#" onclick="redirect('home/appList?t=draft')" title="My Drafts">
|
||||
<img alt="A99679add21e8b0704ea5f0fb569572c_mini" src="/images/simplified/folder-grey.png" />
|
||||
<!-- <span class="menu-label screen-name">new cases</span> -->
|
||||
</a>
|
||||
</li>
|
||||
{if $canStartCase neq false}
|
||||
|
||||
<li class="account">
|
||||
<a class="menu user-actions" href="#">
|
||||
<img alt="A99679add21e8b0704ea5f0fb569572c_mini" src="/images/simplified/plus-set-grey.png" title="New Case"/>
|
||||
|
||||
132
workflow/engine/templates/home/index2.html
Normal file
132
workflow/engine/templates/home/index2.html
Normal file
@@ -0,0 +1,132 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
|
||||
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="/js/jquery/css/smoothness/jquery-ui-1.8.17.custom.css" type="text/css">
|
||||
<link rel="stylesheet" href="/css/simplified.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery/jquery-ui-1.8.17.min.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery/xbreadcrumbs.js"></script>
|
||||
|
||||
|
||||
{literal}
|
||||
<style>
|
||||
body {
|
||||
padding-top: 40px !important;
|
||||
overflow:hidden;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
function resize()
|
||||
{
|
||||
var h = $(window).height() - 42;
|
||||
$('iframe').height(h)
|
||||
}
|
||||
|
||||
function redirect(url)
|
||||
{
|
||||
var $iframe = $('#iframex');
|
||||
$iframe.attr('src', url);
|
||||
return false;
|
||||
}
|
||||
|
||||
function appStart(id, title)
|
||||
{
|
||||
$('#startAppTitle').html(title)
|
||||
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:160,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Start Case": function() {
|
||||
$( this ).dialog( "close" );
|
||||
redirect('home/startCase?id='+id);
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
</head>
|
||||
<body onload="resize()" onresize="resize()" >
|
||||
<div class="global-nav" style="height:28px">
|
||||
<!-- start topbar -->
|
||||
<ul class="xbreadcrumbs" id="breadcrumbs-1">
|
||||
<li class="current">
|
||||
<a href="#" class="home">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="setup/main" target="iframex">Scripts</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">jQuery Framework..</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- end topbar -->
|
||||
</div>
|
||||
|
||||
<iframe id="iframex" name="iframex" src="home/appList" width="100%" height="200" scrolling="yes" frameborder="0"></iframe>
|
||||
|
||||
<div id="dialog-confirm" title="Confirm" style="display:none">
|
||||
<p>
|
||||
Start a new case for:<br/>
|
||||
<span class="ui-icon ui-icon-document" style="float:left; margin:0 7px 20px 0;"></span><span id="startAppTitle"/></p>
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
// Javascript to toggle the dropdowns
|
||||
$(document).ready(function(){
|
||||
// Dropdowns
|
||||
$("body").bind("click", function(e) {
|
||||
$("ul.menu-dropdown").hide();
|
||||
$('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide();
|
||||
});
|
||||
|
||||
$("a.menu").click(function() {
|
||||
if ($(this).parent("li").hasClass("open")) {
|
||||
$(this).parent("li").removeClass("open");
|
||||
$(this).siblings("ul.menu-dropdown").hide();
|
||||
} else {
|
||||
$(this).parent("li").addClass("open");
|
||||
$(this).siblings("ul.menu-dropdown").show();
|
||||
}
|
||||
$(this).parent("li").siblings("li").children("ul.menu-dropdown").hide();
|
||||
$(this).parent("li").siblings("li").removeClass("open");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
// To hide some actived menu clicking on inner iframe content
|
||||
$('iframe').load(function(){
|
||||
var iframeDoc = $('iframe').contents().get(0);
|
||||
// Bind event to iframe document
|
||||
$(iframeDoc).bind('click', function( event ) {
|
||||
$("ul.menu-dropdown").hide();
|
||||
$('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide();
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
// Initialize xBreadcrumbs
|
||||
//$('#breadcrumbs-1').xBreadcrumbs();
|
||||
$('#breadcrumbs-1').xBreadcrumbs({ collapsible: true });
|
||||
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
workflow/public_html/images/simplified/home.gif
Normal file
BIN
workflow/public_html/images/simplified/home.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 B |
BIN
workflow/public_html/images/simplified/separator-arrow.gif
Normal file
BIN
workflow/public_html/images/simplified/separator-arrow.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 B |
BIN
workflow/public_html/images/simplified/separator.gif
Normal file
BIN
workflow/public_html/images/simplified/separator.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 B |
Reference in New Issue
Block a user