Przeglądaj źródła

Removed 3rd party audio player.

tags/2.0.3
Teknikode 4 lat temu
rodzic
commit
bd5e4779db

+ 5
- 5
Teknik/Areas/Podcast/Controllers/PodcastController.cs Wyświetl plik

@@ -311,7 +311,7 @@ namespace Teknik.Areas.Podcast.Controllers
List<CommentViewModel> commentViews = new List<CommentViewModel>();
if (comments != null)
{
foreach (Models.PodcastComment comment in comments)
foreach (PodcastComment comment in comments)
{
commentViews.Add(new CommentViewModel(comment));
}
@@ -323,7 +323,7 @@ namespace Teknik.Areas.Podcast.Controllers
[AllowAnonymous]
public ActionResult GetCommentArticle(int commentID)
{
Models.PodcastComment comment = db.PodcastComments.Where(p => (p.PodcastCommentId == commentID)).First();
PodcastComment comment = db.PodcastComments.Where(p => (p.PodcastCommentId == commentID)).First();
if (comment != null)
{
return Json(new { result = comment.Article });
@@ -339,7 +339,7 @@ namespace Teknik.Areas.Podcast.Controllers
{
if (db.Podcasts.Where(p => p.PodcastId == podcastId).FirstOrDefault() != null)
{
Models.PodcastComment comment = db.PodcastComments.Create();
PodcastComment comment = db.PodcastComments.Create();
comment.PodcastId = podcastId;
comment.UserId = db.Users.Where(u => u.Username == User.Identity.Name).First().UserId;
comment.Article = article;
@@ -360,7 +360,7 @@ namespace Teknik.Areas.Podcast.Controllers
{
if (ModelState.IsValid)
{
Models.PodcastComment comment = db.PodcastComments.Find(commentID);
PodcastComment comment = db.PodcastComments.Find(commentID);
if (comment != null)
{
if (comment.User.Username == User.Identity.Name || User.IsInRole("Admin"))
@@ -383,7 +383,7 @@ namespace Teknik.Areas.Podcast.Controllers
{
if (ModelState.IsValid)
{
Models.PodcastComment comment = db.PodcastComments.Find(commentID);
PodcastComment comment = db.PodcastComments.Find(commentID);
if (comment != null)
{
if (comment.User.Username == User.Identity.Name || User.IsInRole("Admin"))

+ 0
- 2
Teknik/Areas/Podcast/PodcastAreaRegistration.cs Wyświetl plik

@@ -48,11 +48,9 @@ namespace Teknik.Areas.Podcast
// Register Script Bundles
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/podcast").Include(
"~/Scripts/bootbox/bootbox.min.js",
"~/Scripts/audioplayer.min.js",
"~/Areas/Podcast/Scripts/Podcast.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new StyleBundle("~/Content/podcast").Include(
"~/Content/audioplayer.css",
"~/Areas/Podcast/Content/Podcast.css"));
}
}

+ 0
- 8
Teknik/Areas/Podcast/Scripts/Podcast.js Wyświetl plik

@@ -166,7 +166,6 @@ function loadMorePodcasts(start, count) {
linkPodcastDelete('.delete_podcast');
linkPodcastPublish('.publish_podcast');
linkPodcastUnpublish('.unpublish_podcast');
linkAudioPlayer('audio');
$(window).bind('scroll', bindScrollPosts);
}
}
@@ -295,11 +294,4 @@ function linkCommentDelete(selector) {
}
});
});
}

function linkAudioPlayer(selector) {
$(selector).audioPlayer(
{
classPrefix: 'audioplayer'
});
}

+ 1
- 6
Teknik/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml Wyświetl plik

@@ -143,15 +143,10 @@
<a name="replies"></a>
<div class="post-comments" id="@Model.PodcastId"></div>
<script>
$( function()
{
linkAudioPlayer('audio');
});

var comments = @Model.Config.PodcastConfig.CommentsToLoad;
var startComment = 0;
loadMoreComments(startComment, comments);
startComment = start_post + comments;
startComment = startComment + comments;
</script>
}
else

Ładowanie…
Anuluj
Zapisz