Porting latest changes from ui_prototype
This commit is contained in:
@@ -6,96 +6,6 @@ $(document).ready(function(){
|
||||
$('.editable-textarea').inlineEdit({control: 'textarea'});
|
||||
});
|
||||
|
||||
// $("a[rel*=leanModal]").leanModal();
|
||||
|
||||
// $(".remove").click(function(){
|
||||
// $(this).parents('li').hide();
|
||||
// });
|
||||
|
||||
// $("#show-sidebar").click(function(){
|
||||
// $("#video-selector").toggleClass('hidden');
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('.use-video').click(function() {
|
||||
// var used = $('#used');
|
||||
// if (used.is(':visible')) {
|
||||
// used.hide().show('slow');
|
||||
// }
|
||||
// used.show();
|
||||
// $('.no-video').hide();
|
||||
// });
|
||||
|
||||
// $('.remove-video').click(function() {
|
||||
// $('#used').hide();
|
||||
// $('.no-video').show();
|
||||
// });
|
||||
|
||||
// $('#new-upload').click(function() {
|
||||
// $('.selected-files').toggle();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// /* $('.block').append('<a href=\"#\" class=\"delete\">✕<\/a>'); */
|
||||
|
||||
// $('a.delete').click(function() {
|
||||
// $(this).parents('.block').hide();
|
||||
// });
|
||||
|
||||
// $('.speed-list > li').hover(function(){
|
||||
// $(this).children('.tooltip').toggle();
|
||||
// });
|
||||
|
||||
// $('.delete-speed').click(function(){
|
||||
// $(this).parents('li.speed').hide();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('.edit-captions').click(function(){
|
||||
// var parentVid = $(this).parents('div');
|
||||
// parentVid.siblings('div.caption-box').toggle();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('.close-box').click(function(){
|
||||
// $(this).parents('.caption-box').hide();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('ul.dropdown').hide();
|
||||
// $('li.questions').click(function() {
|
||||
// $('ul.dropdown').toggle();
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('#mchoice').click(function(){
|
||||
// $('div.used').append($('<div class="block question">').load("/widgets/multi-choice.html"));
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('#text').click(function(){
|
||||
// $('div.used').append($('<div class="block text">').load("/widgets/text.html"));
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('#numerical').click(function(){
|
||||
// $('div.used').append($('<div class="block question">').load("/widgets/text-question.html"));
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('#equation').click(function(){
|
||||
// $('div.used').append($('<div class="block latex">').load("/widgets/latex-equation.html"));
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $('#script').click(function(){
|
||||
// $('div.used').append($('<div class="block code">').load("/widgets/script-widget.html"));
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// $("#mark").markItUp(myWikiSettings);
|
||||
|
||||
|
||||
var heighest = 0;
|
||||
$('.cal ol > li').each(function(){
|
||||
heighest = ($(this).height() > heighest) ? $(this).height() : heighest;
|
||||
@@ -104,10 +14,7 @@ $(document).ready(function(){
|
||||
|
||||
$('.cal ol > li').css('height',heighest + 'px');
|
||||
|
||||
$('.new-week').hide();
|
||||
$('.add-new-week').click(function() {
|
||||
$(this).hide();
|
||||
$('.new-week').show();
|
||||
$('.add-new-section').click(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -117,43 +24,63 @@ $(document).ready(function(){
|
||||
return false;
|
||||
});
|
||||
|
||||
var windowHeight = $(window).resize().height();
|
||||
|
||||
$('.sidebar').css('height', windowHeight);
|
||||
|
||||
$('.edit-week').click( function() {
|
||||
$('body').addClass('content');
|
||||
$('body.content .cal').css('height', windowHeight);
|
||||
$('section.week-new').show();
|
||||
return false;
|
||||
$('.save-update').click(function(){
|
||||
$(this).parent().parent().hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.cal ol li header h1 a').click( function() {
|
||||
$('body').addClass('content');
|
||||
$('body.content .cal').css('height', windowHeight);
|
||||
$('section.week-edit').show();
|
||||
return false;
|
||||
});
|
||||
setHeight = function(){
|
||||
var windowHeight = $(this).height();
|
||||
var calHeight = windowHeight - 29;
|
||||
var sidebarHeight = windowHeight - 73;
|
||||
|
||||
$('.sidebar').css('height', sidebarHeight);
|
||||
$('body.content .cal').css('height', calHeight);
|
||||
|
||||
$('.edit-week').click( function() {
|
||||
$('body').addClass('content');
|
||||
$('body.content .cal').css('height', calHeight);
|
||||
$('section.week-new').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.cal ol li header h1 a').click( function() {
|
||||
$('body').addClass('content');
|
||||
$('body.content .cal').css('height', calHeight);
|
||||
$('section.week-edit').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.sequence-edit').click(function(){
|
||||
$('body').addClass('content');
|
||||
$('body.content .cal').css('height', calHeight);
|
||||
$('section.sequence-edit').show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(setHeight);
|
||||
$(window).bind('resize', setHeight);
|
||||
|
||||
$('.video-new a').click(function(){
|
||||
$('section.video-new').show();
|
||||
return false;
|
||||
$('section.video-new').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.video-edit a').click(function(){
|
||||
$('section.video-edit').show();
|
||||
return false;
|
||||
$('a.video-edit').click(function(){
|
||||
$('section.video-edit').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.problem-new a').click(function(){
|
||||
$('section.problem-new').show();
|
||||
return false;
|
||||
$('section.problem-new').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.problem-edit a').click(function(){
|
||||
$('section.problem-edit').show();
|
||||
return false;
|
||||
$('a.problem-edit').click(function(){
|
||||
$('section.problem-edit').show();
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user