Skip to content

Commit

Permalink
removing pagination on playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolvin committed Nov 21, 2024
1 parent 28cc461 commit 55fef15
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 45 deletions.
2 changes: 1 addition & 1 deletion current/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/analyse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>brightcove.core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion current/it.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<packaging>pom</packaging>
<version>6.1.8</version>
<version>6.1.9</version>
<description>Brightcove Connector</description>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion current/ui.apps.structure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ function buildPlaylistList() {
document.getElementById('searchDiv').style.display = "none";
document.getElementById('searchDiv_pl').style.display = "inline";
document.getElementById('checkToggle').style.display = "none";
document.getElementById('pagination').style.display = "none";
$("span[name=buttonRow]").hide();
$(":button[name=delFromPlstButton]").hide();

Expand Down Expand Up @@ -1968,38 +1969,40 @@ function stopPreview() {

//type should be playlists or videos
function doPageList(total, type) {
if (total > paging.size) {
var numOpt = Math.ceil(total / paging.size);
var select = document.getElementsByName("selPageN");
var options = "";
for (var i = 0; i < numOpt; i++) {
options += '<option style="width:100%" id="' + i + '">';
if (paging.generic == i) {
num = (numOpt - 1 == i) ? (total - i * paging.size) : paging.size;
document.getElementById('divVideoCount').innerHTML = num + ' ' + type + ' (of ' + total + ')';
}
if (numOpt - 1 == i) {
options += 'Page ' + (i+1) + ' (' + type + ' ' + (i * paging.size + 1) + ' to ' + total + ' )</option>';
} else {
options += 'Page ' + (i+1) + ' (' + type + ' ' + (i * paging.size + 1) + ' to ' + ((i + 1) * paging.size) + ' )</option>';
}
}
//remove previous options, add the new ones and select the current page in the option list
$("select[name=selPageN]").empty().append(options).children("[id=" + paging.generic/paging.size + "]").each(function () {
//need to try/catch for IE6
try {
this.selected = true;
} catch (e) {
}
});
$("div[name=pageDiv]").show();
document.getElementById('tdOne').appendChild(document.getElementById('searchDiv'));
} else {
document.getElementById('divVideoCount').innerHTML = total + ' ' + type + ' (of ' + total + ' )';
$("div[name=pageDiv]").hide();
//If there's no page selector, move the search bar down so it doesn't stick out ofplace
document.getElementById('tdTwo').appendChild(document.getElementById('searchDiv'));
}
if (type !== "Playlists") {
if (total > paging.size) {
var numOpt = Math.ceil(total / paging.size);
var select = document.getElementsByName("selPageN");
var options = "";
for (var i = 0; i < numOpt; i++) {
options += '<option style="width:100%" id="' + i + '">';
if (paging.generic == i) {
num = (numOpt - 1 == i) ? (total - i * paging.size) : paging.size;
document.getElementById('divVideoCount').innerHTML = num + ' ' + type + ' (of ' + total + ')';
}
if (numOpt - 1 == i) {
options += 'Page ' + (i+1) + ' (' + type + ' ' + (i * paging.size + 1) + ' to ' + total + ' )</option>';
} else {
options += 'Page ' + (i+1) + ' (' + type + ' ' + (i * paging.size + 1) + ' to ' + ((i + 1) * paging.size) + ' )</option>';
}
}
//remove previous options, add the new ones and select the current page in the option list
$("select[name=selPageN]").empty().append(options).children("[id=" + paging.generic/paging.size + "]").each(function () {
//need to try/catch for IE6
try {
this.selected = true;
} catch (e) {
}
});
$("div[name=pageDiv]").show();
document.getElementById('tdOne').appendChild(document.getElementById('searchDiv'));
} else {
document.getElementById('divVideoCount').innerHTML = total + ' ' + type + ' (of ' + total + ' )';
$("div[name=pageDiv]").hide();
//If there's no page selector, move the search bar down so it doesn't stick out ofplace
document.getElementById('tdTwo').appendChild(document.getElementById('searchDiv'));
}
}
}

function changePage(num) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
From Playlist
</button>
</div>
<div name="pageDiv" class="pageDiv">Page Number:
<div id="pagination" name="pageDiv" class="pageDiv">Page Number:
<select name="selPageN" onchange="changePage(this.selectedIndex)"></select>
</div>
</td>
Expand Down Expand Up @@ -180,10 +180,10 @@
From Playlist
</button>
</div>
<div name="pageDiv" class="pageDiv">
<!-- <div name="pageDiv" class="pageDiv">
Page Number:
<select name="selPageN" onchange="changePage(this.selectedIndex)"></select>
</div>
</div> -->
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion current/ui.config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/ui.content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion current/ui.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.coresecure</groupId>
<artifactId>brightcove</artifactId>
<version>6.1.8</version>
<version>6.1.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit 55fef15

Please sign in to comment.