/** * Created by bugg on 17/06/14. */ var SplashScreen = Backbone.View.extend({ events: { 'click .run_query': 'run_query', 'click .run_dashboards': 'run_dashboard', 'click .head' : 'click_head', 'click .beg_tut': 'run_tour' }, click_head: function(event){ event.preventDefault(); var target = event.target; var a = $(target).attr('class').split(' '); $('nav li').removeClass('active'); $(target).parent().addClass('active'); $('.stabs section').hide(); var active = ""; if(a.indexOf("welcome") > -1){ active = "welcome"; } else if(a.indexOf("features") > -1){ active = "features"; } else if(a.indexOf("help") > -1){ active = "help"; } else if(a.indexOf("enterprise") > -1){ active = "enterprise"; } $('#'+active).fadeIn(); }, run_tour: function(){ this.toolbar = Saiku.toolbar; var tour = new Tour({toolbar: this.toolbar}); tour.run_tour(); }, initialize: function(args) { _.bindAll(this, "caption"); _.extend(this, Backbone.Events); }, run_query : function(){ Saiku.tabs.add(new Workspace()); return false; }, run_dashboard : function(){ if(Saiku.Dashboards === undefined){ alert("Please upgrade to Saiku Enterprise for Dashboards") } else { var tab = _.find(Saiku.tabs._tabs, function(tab) { return tab.content instanceof Dashboards; }); if (tab) { tab.select(); } else { Saiku.tabs.add(new Dashboards()); } return false; } return false; }, template: function() { var template = $("
Saiku has the power to change" + " the way you think about your business and make decisions. Saiku provides powerful, web based" + " analytics for everyone in your organisation. Quickly and easily analyse data from any data source" + " to discover what is really happening inside and outside your organisation.
Saiku Analytics provides both a Community Version and an Enterprise Version with added features. " + "To find out more you can visit our website or watch the videos on our " + "Youtube channel.
" + "If you are using Saiku Analytics in a business or commercial product, you can help give back in many ways. " + "Swing by our and help foster the community, " + "join the mailing lists and ask/answer questions, sponsor a new feature, " + "or best of all purchase an EE license, which funds development of Saiku Community Edition " + "along with Enterprise Edition.
"+json.item[i].body+"
") } }, error: function(e) { console.log(e.message); } }); }, getContent: function(){ var that =this; var license = new License(); $.ajax({ type: 'GET', url: "http://meteorite.bi/content.json", async: false, contentType: "application/json", dataType: 'jsonp', jsonpCallback: 'jsonCallback2', cache: true, success: function(json) { $(that.el).find("#dyn_content").html(json.item[0].content); $(that.el).find(".responsive-container").fitVids(); //$(self.el).html(self.template()).appendTo($('body')); $(self.el).html(that.template()); /* if (Settings.LICENSE.licenseType != "trial" && Settings.LICENSE.licenseType != "Open Source" + " License") { $(self.el).find(".enterprisetoggle").css("visibility", "hidden"); } */ }, error: function(e) { //$(self.el).html(self.template()).appendTo($('body')); $(self.el).html(self.template()); /* if (Settings.LICENSE.licenseType != "trial" && Settings.LICENSE.licenseType != "Open Source" + " License") { $(self.el).find(".enterprisetoggle").css("visibility", "hidden"); } */ } }); } });