fix dashboard toggle and a couple style regressions

Change-Id: I47ab5610df59ec192c7296875ec1df74691ac789
This commit is contained in:
Jon Jensen 2012-06-13 16:41:41 -06:00
parent 864d272aac
commit b7d48e45ae
9 changed files with 15 additions and 21 deletions

View File

@ -29,4 +29,4 @@ require [
todo: new TodoView
comingUp: new ComingUpView
$('#content .dashboardActions').prepend(dashboardToggle('disable'))
$('#right-side').prepend(dashboardToggle('disable'))

View File

@ -1,2 +0,0 @@
require ['compiled/dashboardToggle'], (dashboardToggle) ->
$('#breadcrumbs').prepend(dashboardToggle('enable'))

View File

@ -8,11 +8,10 @@ require [
'compiled/views/groups/dashboard/MessageView'
'compiled/views/ActivityFeed/ActivityFeedItemsView'
'compiled/groups/dashboard/collections/ActivityFeedItemsCollection'
'compiled/dashboardToggle'
'compiled/views/Kollections/IndexView'
'compiled/collections/KollectionCollection'
], ($, {View}, GroupDashboardView, QuickStartBarView, DiscussionView, AnnouncementView, MessageView, ActivityFeedItemsView, GroupActivityFeedItemsCollection, dashboardToggle, KollectionIndexView, KollectionCollection) ->
], ($, {View}, GroupDashboardView, QuickStartBarView, DiscussionView, AnnouncementView, MessageView, ActivityFeedItemsView, GroupActivityFeedItemsCollection, KollectionIndexView, KollectionCollection) ->
$ ->
window.dashboard = new GroupDashboardView
@ -32,5 +31,3 @@ require [
collection = new KollectionCollection
collection.url = "/api/v1/groups/#{ENV.GROUP_ID}/collections"
collection
$('.sidebar-header').eq(0).before(dashboardToggle('disable'))

View File

@ -217,13 +217,13 @@ class GroupsController < ApplicationController
end
end
if authorized_action(@group, @current_user, :read)
if show_new_dashboard?
@use_new_styles = true
js_env :GROUP_ID => @group.id
return render :action => :dashboard, :layout => 'new_application'
else
@home_page = WikiNamespace.default_for_context(@group).wiki.wiki_page
end
#if show_new_dashboard?
# @use_new_styles = true
# js_env :GROUP_ID => @group.id
# return render :action => :dashboard
#else
@home_page = WikiNamespace.default_for_context(@group).wiki.wiki_page
#end
end
end
format.json do

View File

@ -1436,7 +1436,7 @@ form.user_content_post_form
cursor: pointer
.dashboard-toggle
float: right
margin: 10px 0 0
display: block
padding: 10px 0 0
#breadcrumbs .dashboard-toggle
margin: 4px 0

View File

@ -1,5 +1,4 @@
@import 'blue/variables';
@import 'blue/mixins';
@import 'environment';
body {
background: #fff url(/images/registration/blue-tile.png) 0 0 repeat;

View File

@ -1,5 +1,4 @@
<% content_for :page_title do %><%= join_title @group.name, @context.full_name %><% end %>
<% js_bundle :group %>
<% @active_tab = "home" %>
<% content_for :auto_discovery do %>
<% if @context_membership %>

View File

@ -156,7 +156,6 @@
{ name: "compiled/bundles/gradebook_uploads", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/gradebooks", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/grading_standards", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/group", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/groups", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/jobs", exclude: ['common', 'compiled/tinymce'] },
{ name: "compiled/bundles/jquery_ui_menu", exclude: ['common', 'compiled/tinymce'] },

View File

@ -22,7 +22,9 @@ define([
'jquery.instructure_misc_plugins' /* showIf */
], function(I18n, $, dashboardToggle) {
$('#not_right_side').prepend(dashboardToggle('enable'));
var $toggle = $(dashboardToggle('enable'));
$toggle.css({float: 'right'})
$('#not_right_side').prepend($toggle);
$(function initDashbardJs(){