Commit b60ab5ae by Tom Giannattasio

lms styles; asset icon and style cleanups

parent e171d97d
...@@ -3,6 +3,7 @@ var $htmlPreview; ...@@ -3,6 +3,7 @@ var $htmlPreview;
var $htmlEditor; var $htmlEditor;
var $visualEditor; var $visualEditor;
var $assetWidget; var $assetWidget;
var $linkDialog;
var visualEditor; var visualEditor;
var htmlEditor; var htmlEditor;
...@@ -18,7 +19,7 @@ function initHTMLEditor($editor, $prev) { ...@@ -18,7 +19,7 @@ function initHTMLEditor($editor, $prev) {
skin: 'studio', skin: 'studio',
// we may want to add "styleselect" when we collect all styles used throughout the lms // we may want to add "styleselect" when we collect all styles used throughout the lms
theme_advanced_buttons1 : "formatselect,bold,italic,underline,bullist,numlist,outdent,indent,blockquote,studio.asset,link,unlink", theme_advanced_buttons1 : "formatselect,bold,italic,underline,studio.asset,bullist,numlist,outdent,indent,blockquote,link,unlink",
theme_advanced_toolbar_location : "top", theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left", theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "none", theme_advanced_statusbar_location : "none",
...@@ -42,6 +43,20 @@ function initHTMLEditor($editor, $prev) { ...@@ -42,6 +43,20 @@ function initHTMLEditor($editor, $prev) {
$body.append($assetWidget); $body.append($assetWidget);
} }
}); });
ed.addButton('studio.link', {
title : 'Add Link',
image : '/static/img/visual-editor-image-icon.png',
onclick : function() {
$linkDialog = $($('#tiny-link-dialog').html());
$modalCover.unbind('click');
$modalCover.bind('click', closeLinkDialog);
$modalCover.css('z-index', '99999');
// $('.upload-button', $assetWidget).bind('click', uploadFromWidget);
// $('.close-button', $assetWidget).bind('click', closeAssetWidget);
// $('.insert-asset-button', $assetWidget).bind('click', { editor: ed }, insertAsset);
$body.append($linkDialog);
}
});
} }
}); });
}, 100); }, 100);
...@@ -55,6 +70,10 @@ function initHTMLEditor($editor, $prev) { ...@@ -55,6 +70,10 @@ function initHTMLEditor($editor, $prev) {
$editor.find('.save-button, .cancel-button').bind('click', updateHTMLPreview); $editor.find('.save-button, .cancel-button').bind('click', updateHTMLPreview);
} }
function closeLinkDialog(e) {
}
function uploadFromWidget(e) { function uploadFromWidget(e) {
$('.library', $assetWidget).hide(); $('.library', $assetWidget).hide();
$('.upload-form', $assetWidget).show(); $('.upload-form', $assetWidget).show();
......
...@@ -14,12 +14,17 @@ ...@@ -14,12 +14,17 @@
line-height: 1.6; line-height: 1.6;
} }
h1 {
float: none;
}
h2 { h2 {
color: #646464; color: #646464;
font-size: 19px; font-size: 19px;
font-weight: 300; font-weight: 300;
letter-spacing: 1px; letter-spacing: 1px;
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 0;
text-transform: uppercase; text-transform: uppercase;
} }
...@@ -28,6 +33,15 @@ ...@@ -28,6 +33,15 @@
font-weight: 400; font-weight: 400;
} }
h4 {
background: none;
padding: 0;
border: none;
@include box-shadow(none);
font-size: 16px;
font-weight: 400;
}
code { code {
margin: 0 2px; margin: 0 2px;
padding: 0px 5px; padding: 0px 5px;
......
...@@ -40,15 +40,6 @@ ...@@ -40,15 +40,6 @@
} }
} }
// h2 {
// margin: 30px 0;
// color: #646464;
// font-size: 19px;
// font-weight: 300;
// letter-spacing: 1px;
// text-transform: uppercase;
// }
.components { .components {
> li { > li {
position: relative; position: relative;
...@@ -802,4 +793,27 @@ ...@@ -802,4 +793,27 @@
padding: 0; padding: 0;
background: none; background: none;
} }
}
.tiny-link-dialog {
position: fixed;
top: 40px;
left: 50%;
z-index: 99999;
width: 600px;
margin-left: -300px;
background: #fff;
.close-button {
@include white-button;
position: absolute;
top: 0;
right: 15px;
width: 29px;
height: 29px;
padding: 0 !important;
border-radius: 17px !important;
line-height: 29px;
text-align: center;
}
} }
\ No newline at end of file
...@@ -58,12 +58,25 @@ ...@@ -58,12 +58,25 @@
<script src="/static/js/tiny_mce/tiny_mce.js"></script> <script src="/static/js/tiny_mce/tiny_mce.js"></script>
<script src="/static/js/tiny_mce/jquery.tinymce.js"></script> <script src="/static/js/tiny_mce/jquery.tinymce.js"></script>
<script type="text/template" id="tiny-link-dialog">
<article class="tiny-link-dialog">
<a href="#" class="close-button">
<span class="close-icon"></span>
</a>
<h1>Link to</h1>
<form class="link-to">
<input type="text" class="link-to-input">
<a href="#" class="browse-button">Browse Courseware</a>
<input type="submit" value="Add Link">
</form>
</article>
</script>
<script type="text/template" id="asset-library-widget"> <script type="text/template" id="asset-library-widget">
<article class="asset-library widget"> <article class="asset-library widget">
<a href="#" class="close-button"> <a href="#" class="close-button">
<span class="close-icon"></span> <span class="close-icon"></span>
</a> </a>
<div class="upload-form upload-modal"> <div class="upload-form upload-modal">
<h1>Upload New File</h1> <h1>Upload New File</h1>
<p class="file-name"></p> <p class="file-name"></p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment