@@ -1,6 +1,6 @@ | |||
<div class="message-box"> | |||
<div class="media timeline-head"> | |||
<span class="pull-left avatar avatar-medium"> | |||
<span class="pull-left avatar avatar-medium hidden-xs"> | |||
<img class="media-object" src="{%= frappe.user.image() %}"> | |||
</span> | |||
<div class="media-body"> | |||
@@ -2,9 +2,9 @@ | |||
{% if (data.owner==data.comment_docname && data.parenttype!="Assignment") { %} | |||
<span class="pull-left indicator orange" title="{%= __("Public") %}"></span> | |||
{% } %} | |||
<div class="col-xs-9"> | |||
<div class="col-sm-9"> | |||
<div class="media"> | |||
<div class="pull-left"> | |||
<div class="pull-left hidden-xs"> | |||
<span class="avatar avatar-small" title="{%= frappe.user.full_name(data.owner) %} "> | |||
<img class="media-object" src="{%= frappe.user.image(data.owner) %}"> | |||
</span> | |||
@@ -14,8 +14,9 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="col-xs-3 text-right"> | |||
<div class="col-sm-3 text-right message-row-right"> | |||
<div class="text-muted"> | |||
<span class="hidden-sm hidden-md hidden-lg">{%= frappe.user.full_name(data.owner) %}, </span> | |||
{%= comment_when(data.modified) %} | |||
</div> | |||
{% if (data.owner==user /* && !data.comment_type && data.parenttype!="Assignment" */ ) { %} | |||
@@ -172,9 +172,7 @@ | |||
"public/js/frappe/list/list_item_main_head.html", | |||
"public/js/frappe/list/list_item_row_head.html", | |||
"public/js/frappe/list/list_item_subject.html", | |||
"public/js/frappe/list/listview.js", | |||
"public/js/frappe/views/calendar.js", | |||
"public/js/frappe/views/ganttview.js" | |||
"public/js/frappe/list/listview.js" | |||
], | |||
"css/report.min.css": [ | |||
"public/css/report.css", | |||
@@ -189,6 +187,8 @@ | |||
"public/js/frappe/views/reports/query_report.js", | |||
"public/js/frappe/views/reports/grid_report.js", | |||
"public/js/frappe/views/reports/print_grid.html", | |||
"public/js/frappe/views/calendar.js", | |||
"public/js/frappe/views/ganttview.js", | |||
"public/js/lib/slickgrid/jquery.event.drag.js", | |||
"public/js/lib/slickgrid/plugins/slick.cellrangedecorator.js", | |||
@@ -159,6 +159,10 @@ | |||
#page-messages .list-row { | |||
padding: 7px 0px; | |||
} | |||
#page-messages .message-row-right { | |||
margin-top: 10px; | |||
text-align: left; | |||
} | |||
} | |||
@media (max-width: 991px) { | |||
.intro-area, | |||
@@ -197,40 +201,6 @@ | |||
.navbar > .container > .navbar-right { | |||
float: right; | |||
} | |||
body[data-route^="Module"] .navbar .navbar-home { | |||
display: inline-block !important; | |||
padding-left: 0px; | |||
margin-left: 0px; | |||
padding-top: 6px; | |||
} | |||
body[data-route^="Module"] .navbar .navbar-home:before { | |||
font-family: FontAwesome; | |||
font-weight: normal; | |||
font-style: normal; | |||
text-decoration: inherit; | |||
-webkit-font-smoothing: antialiased; | |||
*margin-right: .3em; | |||
display: inline-block; | |||
speak: none; | |||
font-size: 24px; | |||
transition: 0.2s; | |||
position: relative; | |||
top: 3px; | |||
content: "\f104"; | |||
margin-right: 5px; | |||
color: #6c7680; | |||
} | |||
body[data-route^="Module"] .navbar .navbar-home:hover:before, | |||
body[data-route^="Module"] .navbar .navbar-home:focus:before, | |||
body[data-route^="Module"] .navbar .navbar-home:active:before { | |||
color: #36414c !important; | |||
} | |||
body[data-route^="Module"] .page-title { | |||
width: 100%; | |||
} | |||
body[data-route^="Module"] .page-actions { | |||
display: none !important; | |||
} | |||
.module-item { | |||
padding: 7px 0px !important; | |||
} | |||
@@ -358,4 +328,42 @@ | |||
right: 25%; | |||
text-align: center; | |||
} | |||
body.no-breadcrumbs .navbar .navbar-home { | |||
display: inline-block !important; | |||
padding-left: 0px; | |||
margin-left: 0px; | |||
padding-top: 6px; | |||
} | |||
body.no-breadcrumbs .navbar .navbar-home:before { | |||
font-family: FontAwesome; | |||
font-weight: normal; | |||
font-style: normal; | |||
text-decoration: inherit; | |||
-webkit-font-smoothing: antialiased; | |||
*margin-right: .3em; | |||
display: inline-block; | |||
speak: none; | |||
font-size: 24px; | |||
transition: 0.2s; | |||
position: relative; | |||
top: 3px; | |||
content: "\f104"; | |||
margin-right: 5px; | |||
color: #6c7680; | |||
} | |||
body.no-breadcrumbs .navbar .navbar-home:hover:before, | |||
body.no-breadcrumbs .navbar .navbar-home:focus:before, | |||
body.no-breadcrumbs .navbar .navbar-home:active:before { | |||
color: #36414c !important; | |||
} | |||
body[data-route=""] .navbar .navbar-home, | |||
body[data-route="desktop"] .navbar .navbar-home { | |||
display: none !important; | |||
} | |||
body[data-route^="Module"] .page-title { | |||
width: 100%; | |||
} | |||
body[data-route^="Module"] .page-actions { | |||
display: none !important; | |||
} | |||
} |
@@ -148,13 +148,9 @@ frappe.assets = { | |||
}, | |||
"Calendar": function() { | |||
frappe.assets.views["Report"](); | |||
frappe.require('assets/frappe/js/lib/fullcalendar/fullcalendar.css'); | |||
frappe.require('assets/frappe/js/lib/fullcalendar/fullcalendar.js'); | |||
}, | |||
"Gantt": function() { | |||
frappe.assets.views["Report"](); | |||
frappe.require('assets/frappe/js/lib/jQuery.Gantt/css/style.css'); | |||
frappe.require('assets/frappe/js/lib/jQuery.Gantt/js/jquery.fn.gantt.js'); | |||
}, | |||
} | |||
}; |
@@ -7,6 +7,10 @@ frappe.provide("frappe.views.calendars"); | |||
frappe.views.CalendarFactory = frappe.views.Factory.extend({ | |||
make: function(route) { | |||
var me = this; | |||
frappe.require('assets/frappe/js/lib/fullcalendar/fullcalendar.css'); | |||
frappe.require('assets/frappe/js/lib/fullcalendar/fullcalendar.js'); | |||
frappe.model.with_doctype(route[1], function() { | |||
var options = { | |||
doctype: route[1] | |||
@@ -56,6 +60,8 @@ frappe.views.Calendar = Class.extend({ | |||
// .html(__("Select dates to create a new ") + __(me.doctype)) | |||
// .appendTo(this.$wrapper); | |||
console.log(this.$cal); | |||
this.$cal.fullCalendar(this.cal_options); | |||
this.set_css(); | |||
@@ -85,7 +85,10 @@ frappe.views.Container = Class.extend({ | |||
update_breadcrumbs: function() { | |||
var breadcrumbs = frappe.breadcrumbs[frappe.get_route_str()]; | |||
var $breadcrumbs = $("#navbar-breadcrumbs").empty(); | |||
if(!breadcrumbs) return; | |||
if(!breadcrumbs) { | |||
$("body").addClass("no-breadcrumbs"); | |||
return; | |||
} | |||
if(breadcrumbs.module && breadcrumbs.module != "Desk") { | |||
if(in_list(["Core", "Email", "Custom", "Workflow"], breadcrumbs.module)) | |||
@@ -106,6 +109,8 @@ frappe.views.Container = Class.extend({ | |||
{doctype: breadcrumbs.doctype, label: __(breadcrumbs.doctype)})) | |||
.appendTo($breadcrumbs); | |||
} | |||
$("body").removeClass("no-breadcrumbs"); | |||
}, | |||
rename_breadcrumbs: function(doctype, old_name, new_name) { | |||
var old_route_str = ["Form", doctype, old_name].join("/"); | |||
@@ -6,6 +6,10 @@ frappe.provide("frappe.views.calendar"); | |||
frappe.views.GanttFactory = frappe.views.Factory.extend({ | |||
make: function(route) { | |||
var me = this; | |||
frappe.require('assets/frappe/js/lib/jQuery.Gantt/css/style.css'); | |||
frappe.require('assets/frappe/js/lib/jQuery.Gantt/js/jquery.fn.gantt.js'); | |||
frappe.model.with_doctype(route[1], function() { | |||
var page = me.make_page(); | |||
$(page).on("show", function() { | |||
@@ -61,7 +61,7 @@ frappe.views.moduleview.ModuleView = Class.extend({ | |||
.appendTo(this.page.sidebar.addClass("hidden-xs hidden-sm")); | |||
var offcanvas_module_sidebar = $(sidebar_content) | |||
.addClass("list-unstyled sidebar-menu") | |||
.appendTo($(".sidebar-left .module-sidebar")); | |||
.appendTo($(".sidebar-left .module-sidebar").empty()); | |||
this.sidebar = offcanvas_module_sidebar.add(module_sidebar); | |||
this.sidebar.on("click", ".module-link", function() { | |||
@@ -206,6 +206,11 @@ | |||
.list-row { | |||
padding: 7px 0px; | |||
} | |||
.message-row-right { | |||
margin-top: 10px; | |||
text-align: left; | |||
} | |||
} | |||
} | |||
@@ -245,10 +250,6 @@ | |||
} | |||
// navbar & breadcrumbs | |||
// .nav > li > a { | |||
// padding: 10px 0px; | |||
// } | |||
.toggle-navbar-new-comments { | |||
padding: 8px 0px !important; | |||
} | |||
@@ -262,35 +263,6 @@ | |||
float: right; | |||
} | |||
// show home in module page | |||
body[data-route^="Module"] .navbar .navbar-home& { | |||
display: inline-block !important; | |||
padding-left: 0px; | |||
margin-left: 0px; | |||
padding-top: 6px; | |||
&:before { | |||
.breadcrumb-divider(); | |||
.breadcrumb-divider-left(); | |||
} | |||
&:hover:before, | |||
&:focus:before, | |||
&:active:before { | |||
color: @text-color !important; | |||
} | |||
} | |||
body[data-route^="Module"] { | |||
.page-title { | |||
width: 100%; | |||
} | |||
.page-actions { | |||
display: none !important; | |||
} | |||
} | |||
.module-item { | |||
padding: 7px 0px !important; | |||
} | |||
@@ -440,4 +412,40 @@ | |||
body[data-route^="Module"] { | |||
.navbar-center-show; | |||
} | |||
// show home when no breadcrumbs | |||
body.no-breadcrumbs .navbar .navbar-home& { | |||
display: inline-block !important; | |||
padding-left: 0px; | |||
margin-left: 0px; | |||
padding-top: 6px; | |||
&:before { | |||
.breadcrumb-divider(); | |||
.breadcrumb-divider-left(); | |||
} | |||
&:hover:before, | |||
&:focus:before, | |||
&:active:before { | |||
color: @text-color !important; | |||
} | |||
} | |||
body[data-route=""], | |||
body[data-route="desktop"] { | |||
.navbar .navbar-home { | |||
display: none !important; | |||
} | |||
} | |||
body[data-route^="Module"] { | |||
.page-title { | |||
width: 100%; | |||
} | |||
.page-actions { | |||
display: none !important; | |||
} | |||
} | |||
} |