From 99713bec4978091de90c6735f57fb3c8024c920c Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Mon, 19 Aug 2013 14:54:49 -0400 Subject: [PATCH 1/2] Studio: adds in UI and styling for course deletion controls on Dashboard --- cms/static/sass/views/_dashboard.scss | 56 ++++++++++++++++++++------- cms/templates/index.html | 7 +++- 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/cms/static/sass/views/_dashboard.scss b/cms/static/sass/views/_dashboard.scss index d27fa955b0ac..6f71c70c1dc6 100644 --- a/cms/static/sass/views/_dashboard.scss +++ b/cms/static/sass/views/_dashboard.scss @@ -314,7 +314,7 @@ &:hover { background: $paleYellow; - .course-actions .view-live-button { + .course-actions .action-view .view { opacity: 1.0; pointer-events: auto; } @@ -337,7 +337,7 @@ // encompassing course link .course-link { @extend %ui-depth2; - width: flex-grid(7, 9); + width: flex-grid(6, 9); margin-right: flex-gutter(); } @@ -383,21 +383,49 @@ .course-actions { @extend %ui-depth3; position: static; - width: flex-grid(2, 9); + width: flex-grid(3, 9); text-align: right; + .action { + display: inline-block; + vertical-align: middle; + margin-right: ($baseline/4); + + &:last-child { + margin-right: 0; + } + } + + // delete course + .action-delete { + + // STATE: disabled + &.is-disabled { + opacity: 0.0; + visibility: hidden; + pointer-events: none; + } + + .delete { + @extend .ui-btn-non; + } + } + // view live button - .view-live-button { - @extend %ui-depth3; - @include transition(opacity $tmg-f2 ease-in-out 0); - @include box-sizing(border-box); - padding: ($baseline/2); - opacity: 0.0; - pointer-events: none; - - &:hover { - opacity: 1.0; - pointer-events: auto; + .action-view { + + .view { + @extend %ui-depth3; + @include transition(opacity $tmg-f2 ease-in-out 0); + @include box-sizing(border-box); + padding: ($baseline/2); + opacity: 0.0; + pointer-events: none; + + &:hover { + opacity: 1.0; + pointer-events: auto; + } } } diff --git a/cms/templates/index.html b/cms/templates/index.html index 794310901dce..a35d45b3f4ae 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -153,8 +153,11 @@

${course}

From c1ec81527a2fda61a6fe5a428585b12703b31509 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Mon, 7 Oct 2013 22:23:09 -0400 Subject: [PATCH 2/2] Studio: sync up delete UI with similar existing patterns (files & uploads) --- cms/static/sass/views/_dashboard.scss | 11 +++++++++-- cms/templates/index.html | 2 +- common/static/sass/_mixins.scss | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cms/static/sass/views/_dashboard.scss b/cms/static/sass/views/_dashboard.scss index 6f71c70c1dc6..5ce8d308f26f 100644 --- a/cms/static/sass/views/_dashboard.scss +++ b/cms/static/sass/views/_dashboard.scss @@ -389,7 +389,7 @@ .action { display: inline-block; vertical-align: middle; - margin-right: ($baseline/4); + margin-right: ($baseline/2); &:last-child { margin-right: 0; @@ -407,7 +407,14 @@ } .delete { - @extend .ui-btn-non; + @extend %ui-btn-non; + @extend %t-action1; + color: $gray-l3; + + &:hover { + background-color: $blue; + color: $gray-l6; + } } } diff --git a/cms/templates/index.html b/cms/templates/index.html index a35d45b3f4ae..d60bc63d28bb 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -157,7 +157,7 @@

${course}

${_("View Live")}
  • - ${_("Delete this course")} + ${_("Delete this course")}
  • diff --git a/common/static/sass/_mixins.scss b/common/static/sass/_mixins.scss index 3c53f0f4cfad..cf3a28fe0d02 100644 --- a/common/static/sass/_mixins.scss +++ b/common/static/sass/_mixins.scss @@ -188,7 +188,7 @@ border: none; border-radius: ($baseline/4); background: none; - padding: 3px ($baseline/2); + padding: ($baseline/4) ($baseline/2); vertical-align: middle; color: $gray-l1;