This repository was archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Requesting a pull to mozilla:master from k88hudson:t3368 #1656
Open
k88hudson
wants to merge
3
commits into
mozilla:master
Choose a base branch
from
k88hudson:t3368
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| @import "common"; | ||
|
|
||
| @import "ui-states"; | ||
| @import "ui-widgets"; | ||
| @import "buttons"; | ||
| @import "dialog"; | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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,52 @@ | ||
| /********************************************************* | ||
| * Tabs | ||
| */ | ||
|
|
||
| .tabs { | ||
| list-style: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| background: #EEE; | ||
| height: 2.4em; | ||
| .clearfix(); | ||
| > li { | ||
| float: left; | ||
| height: 100%; | ||
| line-height: 2.4em; | ||
| border-right: 1px solid @baseLightOutline; | ||
| font-size: 0.9em; | ||
| color: #999; | ||
| padding: 0 1em; | ||
| } | ||
| } | ||
|
|
||
| li[data-tab-control] { | ||
| cursor: pointer; | ||
| &.tab-on { | ||
| background: #FFF; | ||
| color: #555; | ||
| border-top: 1px solid #FFF; | ||
| z-index: 1; | ||
| margin-top: -1px; | ||
| } | ||
| &:hover { | ||
| color: #000; | ||
| } | ||
| } | ||
|
|
||
| .tabs.top { | ||
| > li { | ||
| &.tab-on { | ||
| margin-top: 0; | ||
| border-bottom: 1px solid #FFF; | ||
| border-top: none; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| [data-tab] { | ||
| display: none; | ||
| &.tab-on { | ||
| display: block; | ||
| } | ||
| } |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,12 +2,11 @@ | |
| * If a copy of the MIT license was not distributed with this file, you can | ||
| * obtain one at https://raw.github.com/mozilla/butter/master/LICENSE */ | ||
|
|
||
| define( [ "util/lang", "util/uri", "util/keys", "util/mediatypes", "editor/editor", | ||
| define( [ "util/lang", "util/uri", "util/keys","util/mediatypes", "UI/ui-widgets", "editor/editor", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to Also add a space to before the load of media types.
|
||
| "util/time", "util/dragndrop", "text!layouts/media-editor.html" ], | ||
| function( LangUtils, URI, KeysUtils, MediaUtils, Editor, Time, DragNDrop, EDITOR_LAYOUT ) { | ||
| function( LangUtils, URI, KeysUtils, MediaUtils, UI, Editor, Time, DragNDrop, EDITOR_LAYOUT ) { | ||
|
|
||
| var _parentElement = LangUtils.domFragment( EDITOR_LAYOUT,".media-editor" ), | ||
| _addMediaTitle = _parentElement.querySelector( ".add-new-media" ), | ||
| _addMediaPanel = _parentElement.querySelector( ".add-media-panel" ), | ||
|
|
||
| _urlInput = _addMediaPanel.querySelector( ".add-media-input" ), | ||
|
|
@@ -31,10 +30,6 @@ define( [ "util/lang", "util/uri", "util/keys", "util/mediatypes", "editor/edito | |
| _this, | ||
| TRANSITION_TIME = 2000; | ||
|
|
||
| function toggleAddNewMediaPanel() { | ||
| _parentElement.classList.toggle( "add-media-collapsed" ); | ||
| } | ||
|
|
||
| function resetInput() { | ||
| _urlInput.value = ""; | ||
|
|
||
|
|
@@ -266,7 +261,6 @@ define( [ "util/lang", "util/uri", "util/keys", "util/mediatypes", "editor/edito | |
| } | ||
|
|
||
| function setup() { | ||
| _addMediaTitle.addEventListener( "click", toggleAddNewMediaPanel, false ); | ||
|
|
||
| _urlInput.addEventListener( "focus", onFocus, false ); | ||
| _urlInput.addEventListener( "input", onInput, false ); | ||
|
|
@@ -276,6 +270,10 @@ define( [ "util/lang", "util/uri", "util/keys", "util/mediatypes", "editor/edito | |
|
|
||
| _durationInput.addEventListener( "keydown", onDurationChange, false ); | ||
| _durationInput.addEventListener( "blur", onBlur, false ); | ||
|
|
||
| UI.tabs({ | ||
| element: _addMediaPanel | ||
| }); | ||
| } | ||
|
|
||
| function onDurationChange( e ) { | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,40 +1,42 @@ | ||
| <div class="media-editor butter-editor fadable alternates-hidden allow-scrollbar"> | ||
| <h1 class="add-new-media">Create new media clip</h1> | ||
| <div class="media-gallery-heading">Media Gallery</div> | ||
| <div class="butter-editor-body"> | ||
| <fieldset class="add-media-panel"> | ||
| <div class="media-editor-inner-wrapper primary-media-wrapper"> | ||
| <p> | ||
| <span class="fl-right"> | ||
| <span class="media-icon youtube-icon"></span> | ||
| <span class="media-icon vimeo-icon"></span> | ||
| <span class="media-icon soundcloud-icon"></span> | ||
| <span class="media-icon html5-icon"></span> | ||
| <div class="add-media-panel"> | ||
| <ul class="tabs top"> | ||
| <li class="add-media-title">+ Add</li> | ||
| <li data-tab-control="url" class="tab-on" data-tab-default>URL</li> | ||
| <li data-tab-control="webcam">Webcam</li> | ||
| </ul> | ||
| <div class="tab-container"> | ||
| <div data-tab="url" class="padded"> | ||
| <label> | ||
| <span class="fl-right"> | ||
| <span class="media-icon youtube-icon"></span> | ||
| <span class="media-icon vimeo-icon"></span> | ||
| <span class="media-icon soundcloud-icon"></span> | ||
| <span class="media-icon html5-icon"></span> | ||
| </span> | ||
| Paste a link from YouTube, SoundCloud, Vimeo or an HTML5 video | ||
| </label> | ||
| <textarea class="add-media-input" placeholder="Paste an HTML5, YouTube, Vimeo, or SoundCloud link here"></textarea> | ||
| <span class="butter-btn-slide-out"> | ||
| <a class="add-media-btn butter-btn btn-green hidden">Create clip</a> | ||
| <span class="media-loading-spinner butter-spinner hidden" ></span> | ||
| <label class="media-error-message hidden"></label> | ||
| </span> | ||
| Paste a link from YouTube, SoundCloud, Vimeo or an HTML5 video | ||
| </p> | ||
| <textarea class="add-media-input" placeholder="Paste an HTML5, YouTube, Vimeo, or SoundCloud link here"></textarea> | ||
| <span class="butter-btn-slide-out"> | ||
| <a class="add-media-btn butter-btn btn-green hidden">Create clip</a> | ||
| <span class="media-loading-spinner butter-spinner hidden" ></span> | ||
| <label class="media-error-message hidden"></label> | ||
| </span> | ||
| </div> | ||
| <div data-tab="webcam">Webcam</div> | ||
| </div> | ||
| </fieldset> | ||
|
|
||
| <div class="media-gallery"> | ||
| <div class="media-gallery-heading"> | ||
| Media Gallery | ||
| </div> | ||
| <div class="media-gallery-scroll-container scrollbar-container"> | ||
| <ul class="media-gallery-list scrollbar-outer scrollbar-inner"></ul> | ||
| </div><!-- add-media-panel --> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the comment here? If anything it should be above the div. |
||
| <div class="media-gallery scrollbar-container"> | ||
| <div class="scrollbar-outer scrollbar-inner"> | ||
| <ul class="media-gallery-list"></ul> | ||
| </div> | ||
| </div> | ||
|
|
||
| <fieldset class="media-gallery-base-media butter-form-inline form-single bottom"> | ||
| <label>Duration</label> | ||
| <input type="text" class="media-base-duration" value=""> | ||
| </fieldset> | ||
|
|
||
| </div> | ||
| <div class="row duration-panel"> | ||
| <label>Duration</label> | ||
| <input type="text" class="media-base-duration" value=""> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we could actually just make this a normal
<h1>element now rather than having a div with specific styling because of base styles we have for editors. That is, unless you explicitly want this title smaller than the ones used for say the plugin list or the project editor. If that's the case, why?