Skip to content

Commit

Permalink
Merge pull request sakaiproject#1994 from gsilver/SAK-30564
Browse files Browse the repository at this point in the history
SAK-30564 Morpheus: Resource responsive changes
  • Loading branch information
ottenhoff committed Mar 25, 2016
2 parents b20e93c + b815c7c commit 074aed7
Show file tree
Hide file tree
Showing 14 changed files with 496 additions and 567 deletions.
61 changes: 5 additions & 56 deletions content/content-tool/tool/src/webapp/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ var escapeHtml = function (str) {
}

$(document).ready(function(){

$('[data-toggle="popover"]').popover()


$('#navigate').prop('disabled',false)
$('#navigatePanelSearch').keyup(function(){
var v = $('#navigatePanelSearch').val();
Expand All @@ -239,66 +243,11 @@ $(document).ready(function(){
if ($('#content_print_result_url').length) {
window.open($('#content_print_result_url').val(), $('#content_print_result_url_title'), "height=800,width=800");
}
$('.portletBody').click(function(e){
if (e.target.className != 'menuOpen' && e.target.className != 'dropdn') {
$('.makeMenuChild').hide();
}
else {
if (e.target.className == 'dropdn') {
$('.makeMenuChild').hide();
$(e.target).parent('li').find('ul').show().find('li:first a').focus();

}
else {
$('.makeMenuChild').hide();
$(e.target).find('ul').show().find('li:first a').focus();
}
}
});

$('#navigatePanel p.close').on('click', function(){
$('.keep-open').removeClass('open');
});
$('.toggleDescription').click(function(e){
e.preventDefault();
$('.descPanel').css({
'top': '-1000px',
'left': '-1000px',
'display': 'none'
}).attr({
'aria-hidden': 'true',
'tabindex': '-1'
});
$(this).next('div').css({
'top': e.pageY + 10,
'left': e.pageX + 10,
'cursor': 'pointer',
'display': 'block'
}).attr({
'aria-hidden': 'false',
'tabindex': '0'
});
});
$('.descPanel').blur(function(){
$(this).css({
'top': '-1000px',
'left': '-1000px',
'display': 'none'
}).attr({
'aria-hidden': 'true',
'tabindex': '-1'
});
});
$('.descPanel').click(function(){
$(this).css({
'top': '-1000px',
'left': '-1000px',
'display': 'none'
}).attr({
'aria-hidden': 'true',
'tabindex': '-1'
});
});


$('#navigatePanelInnerCollapse').on('click', function(e){
e.preventDefault();
Expand Down
478 changes: 260 additions & 218 deletions content/content-tool/tool/src/webapp/vm/content/sakai_resources_list.vm

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
<input type="hidden" name="sakai_action" id="sakai_action" value="doReviseProperties" />
<input type="hidden" name="user_action" id="user_action" value="save" />
<div id="propertiesDiv${DOT}$i" style="display:block;">
<p class="shorttext#if($item.isNameMissing()) validation#end">
<div class="form-group #if($item.isNameMissing()) validation#end">
#if($item.canChangeDisplayName() )
<span class="reqStar">*</span>
<label for="displayName${DOT}$i">
$tlang.getString("label.display")
</label>
<input type="text" size="40" id="displayName${DOT}$i" name="displayName${DOT}$i" value="$validator.escapeHtml("$!item.name")" maxlength="512"/>
<input type="text" class="form-control" id="displayName${DOT}$i" name="displayName${DOT}$i" value="$validator.escapeHtml("$!item.name")" maxlength="512"/>
#else
<label for="displayName_display${DOT}$i">
$tlang.getString("label.display")
</label>
<input type="text" size="40" id="displayName_display${DOT}$i" disabled="disabled" value="$validator.escapeHtml("$!item.name")" />
<input type="hidden" id="displayName${DOT}$i" name="displayName${DOT}$i" value="$validator.escapeHtml("$!item.name")" />
#end
</p>
</div>
#parse("/vm/resources/sakai_properties.vm")
<hr class="itemSeparator" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@

#if($multipleMetadataType.contains($metadataType.uniqueName))
#foreach($value in $metadataValue)
<!-- Double selection -->
<select name="${metadataType.uniqueName}_first_count${suffix}">
<!-- Double selection -->xxx
<div class="form-inline">
<select class="form-control" name="${metadataType.uniqueName}_first_count${suffix}">
<option></option>
#foreach ($f in [0..99])
<option #if($value.firstCount == $f) selected="selected" #end value="$f">$f</option>
#end
</select>
<select name="${metadataType.uniqueName}_first_unit${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_first_unit${suffix}">
<option></option>
#foreach ($unit in $metadataType.units)
<option #if($value.firstUnit == ${unit})selected="selected"#end value="${unit}">
Expand All @@ -29,30 +30,32 @@
#end
</select>

<select name="${metadataType.uniqueName}_second_count${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_second_count${suffix}">
<option></option>
#foreach ($f in [0..99])
<option #if($value.secondCount == $f) selected="selected" #end value="$f">$f</option>
#end
</select>
<select name="${metadataType.uniqueName}_second_unit${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_second_unit${suffix}">
<option></option>
#foreach ($unit in $metadataType.units)
<option #if($value.secondUnit == ${unit})selected="selected"#end value="${unit}">
$metaLang.getString("label.lom_duration.${unit}")
</option>
#end
</select>
</div>
#end
#else
<!-- Double selection -->
<select name="${metadataType.uniqueName}_first_count${suffix}">
<div class="form-inline">
<select class="form-control" name="${metadataType.uniqueName}_first_count${suffix}">
<option></option>
#foreach ($f in [0..99])
<option #if($metadataValue.firstCount == $f) selected="selected" #end value="$f">$f</option>
#end
</select>
<select name="${metadataType.uniqueName}_first_unit${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_first_unit${suffix}">
<option></option>
#foreach ($unit in $metadataType.units)
<option #if($metadataValue.firstUnit == ${unit})selected="selected"#end value="${unit}">
Expand All @@ -61,18 +64,19 @@
#end
</select>

<select name="${metadataType.uniqueName}_second_count${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_second_count${suffix}">
<option></option>
#foreach ($f in [0..99])
<option #if($metadataValue.secondCount == $f) selected="selected" #end value="$f">$f</option>
#end
</select>
<select name="${metadataType.uniqueName}_second_unit${suffix}">
<select class="form-control" name="${metadataType.uniqueName}_second_unit${suffix}">
<option></option>
#foreach ($unit in $metadataType.units)
<option #if($metadataValue.secondUnit == ${unit})selected="selected"#end value="${unit}">
$metaLang.getString("label.lom_duration.${unit}")
</option>
#end
</select>
</div>
#end
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<label for="${metadataType.uniqueName}${suffix}">#printMetadataName($metadataType)</label>

<select data-placeholder="#printMetadataDescription($metadataType)" style="width: 350px" name="$!{metadataType.uniqueName}${suffix}"
<select class="form-control" data-placeholder="#printMetadataDescription($metadataType)" style="width: 350px" name="$!{metadataType.uniqueName}${suffix}"
id="$!{metadataType.uniqueName}${suffix}" #if($multipleMetadataType.contains($metadataType.uniqueName)) multiple #end
class="chzn-select">
#if(!$multipleMetadataType.contains($metadataType.uniqueName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

$groupMetadataType.add($groupMetadataLevel, $metadataType)
$groupMetadataValue.add($groupMetadataLevel, $metadataValue)

<p class="discTria" id="metadataShown_${metadataType.uniqueName}${suffix}"
style="#if($metadataType.expanded)display:block;#else display:none;#end">
<a id="hideMetadata_${metadataType.uniqueName}${suffix}" href="#showMetadata_${metadataType.uniqueName}${suffix}"
Expand Down Expand Up @@ -42,7 +41,7 @@ $groupMetadataValue.add($groupMetadataLevel, $metadataValue)
#set($metadataValue = $groupMetadataValue.get($groupMetadataLevel).get($metadataType.uniqueName))
#set($groupMetadataLevel = $groupMetadataLevel + 1)

<p class="shorttext">
<p class="form-group">
#editMetadata($metadataType)
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

#if($multipleMetadataType.contains($metadataType.uniqueName))
#foreach($value in $metadataValue)
<input type="number" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}" value="$value"
<input class="form-control" type="number" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}" value="$value"
#if($metadataType.width)style='width:${metadataType.width}'#end
#if($metadataType.minimumValue)min=${metadataType.minimumValue}#end
#if($metadataType.maximumValue)max=${metadataType.maximumValue}#end
#if($metadataType.step)step=${metadataType.step}#else step=1#end
/>
#end
#else
<input type="number" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}" value="$metadataValue"
<input class="form-control" type="number" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}" value="$metadataValue"
#if($metadataType.width)style='width:${metadataType.width}'#end
#if($metadataType.minimumValue)min=${metadataType.minimumValue}#end
#if($metadataType.maximumValue)max=${metadataType.maximumValue}#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
#if($multipleMetadataType.contains($metadataType.uniqueName))
#foreach($value in $metadataValue)
#if($metadataType.longText)
<textarea name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}">$value</textarea>
<textarea class="form-control" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}">$value</textarea>
#else
<input type="text" size="40" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}"
<input class="form-control" type="text" size="40" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}"
value="$value"/>
#end
#end
#else
#if($metadataType.longText)
<textarea name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}">$metadataValue</textarea>
<textarea class="form-control" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}">$metadataValue</textarea>
#else
<input type="text" size="40" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}"
<input class="form-control" type="text" size="40" name="${metadataType.uniqueName}${suffix}" id="${metadataType.uniqueName}${suffix}"
value="$metadataValue"/>
#end
#end
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<label for="${metadataType.uniqueName}${suffix}">#printMetadataName($metadataType)</label>

<select data-placeholder="#printMetadataDescription($metadataType)" style="width: 350px"
<select class="form-control" data-placeholder="#printMetadataDescription($metadataType)" style="width: 350px"
name="$!{metadataType.uniqueName}${suffix}"
id="$!{metadataType.uniqueName}${suffix}" #if($multipleMetadataType.contains($metadataType.uniqueName))
multiple #end class="chzn-select">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,49 @@
<div class="alertMessage">$tlang.getString("label.alert") $validator.escapeHtml($itemAlertMessage)</div>
<div style="display:block;clear:both" ></div>
#end
<p class="instruction">
$tlang.getString("instr.folders")
</p>
<div class="breadCrumb">
<h4>
<ol class="breadcrumb">
<li><span>
$tlang.getString("gen.location")
</span></li>
##<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString("gen.folder")" />
#foreach ($item in $model.collectionPath)
$validator.escapeHtml($item.name) /
<li><span>$validator.escapeHtml($item.name)</span></li>
#end
</h4>
</div>
</ol>
<p class="instruction">
$tlang.getString("instr.folders")
</p>

<form name="addFolderForm" id="addFolderForm" method="post" action="#toolForm("ResourcesHelperAction")">
<input type="hidden" name="pipe-init-id" id="pipe-init-id" value="$!{pipe-init-id}" />
<input type="hidden" name="fileCount" id="fileCount" value="$pipes.size()" />
<input type="hidden" name="requestStateId" id="requestStateId" value="$!{requestStateId}" />
#set($lastIndex = $pipes.size() - 1)
<input type="hidden" name="lastIndex" id="lastIndex" value="$lastIndex" />
<div id="fileInputDiv">
<div id="fileInputDiv" class="well">
#set($i = -1)
#foreach($pipe in $pipes)
#set($prev = $i)
#set($i = $i + 1)
#set($next = $i + 1)
<div id="contentDiv${DOT}$i" class="actionitem highlightPanel">
<div id="contentDiv${DOT}$i" class="container-fluid">
<input type="hidden" name="exists${DOT}$i" id="exists${DOT}$i" value="true" />
<p class="shorttext" style="border:none">
<label for="content${DOT}$i">$tlang.getString("label.folder")</label>
<input type="text" name="content${DOT}$i" id="content${DOT}$i" />
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"
<label for="content${DOT}$i">$tlang.getString("label.folder")</label>
</div>
<div class="col-lg-6 col-md-6 col-sm-4 col-xs-12">
<input type="text" name="content${DOT}$i" id="content${DOT}$i" />
## onkeypress="return handleEnterKey(this, event)"
<a class="indnt2" href="#" id="propsTrigger${DOT}$i">$tlang.getString("edit.show")</a>
<a class="indnt2 remove" style="display:none" href="#" id="removeTrigger${DOT}$i" title="$tlang.getString("edit.remove")">
<img src="#imageLink("sakai/cross.png")" alt="x" />
</a>
</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<a href="#" id="propsTrigger${DOT}$i">$tlang.getString("edit.show")</a>
<a class="remove" style="display:none" href="#" id="removeTrigger${DOT}$i" title="$tlang.getString("edit.remove")">
<img src="#imageLink("sakai/cross.png")" alt="x" />
</a>
</div>
<br><br>
</div>
<input type="hidden" id="prev${DOT}$i" name="prev${DOT}$i" value="#if($prev >= 0)${prev}#end" />
<input type="hidden" id="next${DOT}$i" name="next${DOT}$i" value="#if($next < $pipes.size())${next}#end" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#else
<p class="longtext">
#end
<textarea name="content" id="content" rows="10" cols="80" wrap="virtual">$!validator.escapeHtmlTextarea($!{pipe.contentstring})</textarea>
<textarea class="form-control" name="content" id="content" rows="10" wrap="virtual">$!validator.escapeHtmlTextarea($!{pipe.contentstring})</textarea>
</p>
<p class="act">
<input type="button" class="active" name="savechanges" id="saveChanges" onclick="showNotif('submitnotifxxx','saveChanges','addContentForm');document.getElementById('addContentForm').action='#toolLink("ResourcesHelperAction" "doContinue")';submitform('addContentForm');" value="$tlang.getString("label.continue")" accesskey="s" />
Expand Down
Loading

0 comments on commit 074aed7

Please sign in to comment.