Skip to content

Commit

Permalink
SAK-43412 - SWITCH: Podcasts: Fix bad pattern in the first selected t…
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Pellicer authored Mar 17, 2020
1 parent 2b9ee0c commit c6e06ba
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 15 deletions.
8 changes: 7 additions & 1 deletion podcasts/podcasts-app/src/webapp/podcasts/podAdd.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
val: '',
ashidden: { iso8601: 'podAddISO8601' }
});
var menuLink = $('#podcastAddMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>

<h:form id="podAdd" enctype="multipart/form-data">

<%@ include file="/podcasts/podcastMenu.jsp" %>
<div> <!-- Page title and Instructions -->
<div class="page-header">
<h1><h:outputText value="#{msgs.add_title}" /></h1>
Expand Down
11 changes: 11 additions & 0 deletions podcasts/podcasts-app/src/webapp/podcasts/podDelete.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@

<f:view>
<sakai:view toolCssHref="./css/podcaster.css">
<script>includeLatestJQuery("podDelete");</script>
<script>
$(document).ready(function() {
var menuLink = $('#podcastMainMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>
<h:form>
<%@ include file="/podcasts/podcastMenu.jsp" %>
<h:outputText value="#{msgs.del_confirm}" styleClass="sak-banner-warn" />
<h:panelGroup style="display:block;">
<h:outputText value="#{podHomeBean.selectedPodcast.title}" />
Expand Down
13 changes: 12 additions & 1 deletion podcasts/podcasts-app/src/webapp/podcasts/podFeedRevise.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@

<f:view>
<sakai:view toolCssHref="css/podcaster.css">
<h:form id="podFeedRev" >
<script>includeLatestJQuery("podFeedRevise");</script>
<script>
$(document).ready(function() {
var menuLink = $('#podcastMainMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>
<h:form id="podFeedRev" >
<%@ include file="/podcasts/podcastMenu.jsp" %>
<div> <!-- Page title and Instructions -->
<div class="page-header">
<h1><h:outputText value="#{msgs.podfeed_revise_title}" /></h1>
Expand Down
13 changes: 6 additions & 7 deletions podcasts/podcasts-app/src/webapp/podcasts/podMain.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
</script>
<script>
$(document).ready(function(){
initializePopover("podMainForm\\:popover", "<h:outputText value="#{msgs.popup_text}" />");
initializePopover("podMainForm\\:popover", "<h:outputText value="#{msgs.popup_text}" />");
var menuLink = $('#podcastMainMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>

<h:form id="podMainForm">
<%@ include file="/podcasts/podcastMenu.jsp" %>

<%-- if Resources tool not exist, if instructor, display error message
if student, display no podcasts exists --%>
Expand All @@ -30,12 +35,6 @@
</h:panelGroup>

<h:panelGroup rendered="#{podHomeBean.resourceToolExists && podHomeBean.canAccessFolder}" >
<sakai:tool_bar rendered="#{podHomeBean.canUpdateSite || podHomeBean.hasNewPerm}">
<sakai:tool_bar_item action="podcastAdd" value="#{msgs.add}" rendered="#{podHomeBean.hasNewPerm || podHomeBean.canUpdateSite}" />
<sakai:tool_bar_item action="podcastOptions" value="#{msgs.options}" rendered="#{podHomeBean.canUpdateSite}" />
<sakai:tool_bar_item action="#{podHomeBean.processPermissions}" value="#{msgs.permissions}" rendered="#{podHomeBean.canUpdateSite}" />
</sakai:tool_bar>

<h:outputText value="#{msgs.no_access}" styleClass="validation" rendered="#{! podHomeBean.hasAllGroups && ! podHomeBean.hasReadPerm }" />

<h:panelGroup rendered="#{podHomeBean.hasReadPerm || podHomeBean.hasAllGroups}">
Expand Down
17 changes: 15 additions & 2 deletions podcasts/podcasts-app/src/webapp/podcasts/podOptions.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,24 @@
<link href="/library/skin/tool_base.css" type="text/css" rel="stylesheet" media="all" />
<link href="/library/skin/default/tool.css" type="text/css" rel="stylesheet" media="all" />

<script type="text/javascript" src="/library/js/headscripts.js"></script>
<script src="/library/js/headscripts.js"></script>

<sakai:view toolCssHref="./css/podcaster.css">
<script type="text/javascript" src="./scripts/popupscripts.js"></script>
<script src="./scripts/popupscripts.js"></script>

<script>includeLatestJQuery('podOptions.jsp');</script>
<script>
$(document).ready(function(){
initializePopover("podMainForm\\:popover", "<h:outputText value="#{msgs.popup_text}" />");
var menuLink = $('#podcastOptionsMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>

<h:form enctype="multipart/form-data">
<%@ include file="/podcasts/podcastMenu.jsp" %>
<div> <!-- Page title and Instructions -->
<div class="page-header">
<h1><h:outputText value="#{msgs.options_title}" /></h1>
Expand Down
14 changes: 10 additions & 4 deletions podcasts/podcasts-app/src/webapp/podcasts/podRevise.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<link href="/library/skin/default/tool.css" type="text/css" rel="stylesheet" media="all" />

<sakai:view toolCssHref="./css/podcaster.css">
<script type="text/javascript">includeLatestJQuery("podRevise");</script>
<script type="text/javascript" src="/library/js/lang-datepicker/lang-datepicker.js"></script>
<script>includeLatestJQuery("podRevise");</script>
<script src="/library/js/lang-datepicker/lang-datepicker.js"></script>

<script type="text/javascript">
<script>
$(document).ready(function() {
localDatePicker({
input: '#podRev\\:poddate',
Expand All @@ -25,11 +25,17 @@
val: '<h:outputText value="#{podHomeBean.selectedPodcast.displayDateRevise}"><f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/></h:outputText>',
ashidden: { iso8601: 'podReviseISO8601' }
});
var menuLink = $('#podcastMainMenuLink');
var menuLinkSpan = menuLink.closest('span');
menuLinkSpan.addClass('current');
menuLinkSpan.html(menuLink.text());
});
</script>

<h:form id="podRev" enctype="multipart/form-data">

<%@ include file="/podcasts/podcastMenu.jsp" %>
<div> <!-- Page title and Instructions -->
<div class="page-header">
<h1><h:outputText value="#{msgs.revise_title}" /></h1>
Expand Down
47 changes: 47 additions & 0 deletions podcasts/podcasts-app/src/webapp/podcasts/podcastMenu.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<%--
***********************************************************************************
*
* Copyright (c) 2020 Apereo Foundation
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://opensource.org/licenses/ecl2
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************************/
--%>
<h:panelGroup><f:verbatim>
<ul class="navIntraTool actionToolbar" role="menu">
<li role="menuitem">
<span id="podcastMainMenuLink"></f:verbatim>
<h:commandLink value="#{msgs.podcast_home_title}" action="cancel"/><f:verbatim>
</span>
</li></f:verbatim>
<h:panelGroup rendered="#{podHomeBean.hasNewPerm || podHomeBean.canUpdateSite}"><f:verbatim>
<li role="menuitem">
<span id="podcastAddMenuLink"></f:verbatim>
<h:commandLink value="#{msgs.add}" action="podcastAdd"/><f:verbatim>
</span>
</li></f:verbatim>
</h:panelGroup>
<h:panelGroup rendered="#{podHomeBean.canUpdateSite}"><f:verbatim>
<li role="menuitem">
<span id="podcastOptionsMenuLink"></f:verbatim>
<h:commandLink value="#{msgs.options}" action="podcastOptions"/><f:verbatim>
</span>
</li></f:verbatim>
</h:panelGroup>
<h:panelGroup rendered="#{podHomeBean.canUpdateSite}"><f:verbatim>
<li role="menuitem">
<span id="podcastPermissionsMenuLink"></f:verbatim>
<h:commandLink value="#{msgs.permissions}" action="#{podHomeBean.processPermissions}" /><f:verbatim>
</span>
</li></f:verbatim>
</h:panelGroup><f:verbatim>
</ul></f:verbatim>
</h:panelGroup>

0 comments on commit c6e06ba

Please sign in to comment.