Skip to content

Instantly share code, notes, and snippets.

@bluemango
bluemango / gist:1853413
Created February 17, 2012 13:22
Zendesk ScreenSteps Live CSS for nested chapters
#screensteps-content-wrapper #screensteps-sidebar div.screensteps-sidebar-widget#sidebar-chapters .nested-chapter-lessons { margin-left: 0; margin-right:0;}
#screensteps-content-wrapper #screensteps-sidebar .nested-chapter-lessons > li { padding-left:36px; margin-left: -10px; }
#screensteps-content-wrapper #screensteps-sidebar .nested-chapter-lessons > li a { font-weight: normal; }
#screensteps-content-wrapper #screensteps-sidebar .nested-chapter-lessons li.here { background-color: #0064CD; color:white;}
#screensteps-content-wrapper #screensteps-sidebar .nested-chapter-lessons li.here a { font-weight: bold; color: white;}
#screensteps-sidebar #sidebar-chapters li a:hover span.chapter-link {background: url("/images/arrow-chapters-down.png") no-repeat left center;}
@bluemango
bluemango / gist:1540342
Created December 30, 2011 15:39
JS to replace Zendesk Search box with search docs box
jQuery("#search_box").text("Search");
if (jQuery("#suggestion_submit")) {
jQuery("#suggestion_submit").click(function(e){
var search_string = jQuery("#suggestions_query").val();
var query_string = jQuery("#suggestions_query").val().replace(/\s/g,"+");
window.location = "http://help.bluemangolearning.com/searches?text=" + query_string;
return false;
});
};
@bluemango
bluemango / gist:1385907
Created November 22, 2011 15:18
Zendesk CSS using ScreenSteps Live Sidebar
body { background-color: #1E2732; padding: 0 8px; }
div#page a.image-link:hover { text-decoration: none; }
#screensteps-content-wrapper { margin-bottom: 20px; padding-top:20px;}
#screensteps-content-wrapper #screensteps-title-area { padding: 0; border:0;}
#screensteps-content-wrapper ol, #screensteps-content-wrapper ul { margin: 1em 0px; padding-left: 40px;}
'SELECT `lessons`.`id` * 1 + 0 AS `id`,
`spaces`.`id` AS `published_space_id`
FROM lessons
LEFT JOIN readings on lessons.id = readings.lesson_id AND lessons.draft = 0
LEFT JOIN sections on readings.section_id = sections.id AND sections.hidden = 0
LEFT JOIN manuals on manuals.id = sections.manual_id AND manuals.draft = 0
LEFT JOIN assets_spaces as manual_assets ON manual_assets.asset_id = manuals.id AND manual_assets.asset_type = "Manual"
LEFT JOIN spaces ON manual_assets.space_id = spaces.id'
@bluemango
bluemango / gist:1365067
Created November 14, 2011 20:34
Dual searh button for Zendesk/ScreenSteps Live
jQuery("#search_box").text("Search");
if (jQuery("#suggestion_submit")) {
jQuery("#suggestion_submit").val("Search Forums");
var html_string = '<input type="submit" name="commit" value="Search Docs" class="button search primary" id="screensteps-search-submit"/>'
jQuery("#suggestion_submit").before(html_string);
jQuery("#suggestion_submit").removeClass('primary');
jQuery("#screensteps-search-submit").css("margin-left", "0px").before("<br /><br />");
jQuery("#screensteps-search-submit").click(function(e){
@bluemango
bluemango / gist:1253340
Created September 30, 2011 10:09
Add search box on empty search results
$(document).ready(function() {
if (
($('.site-search #screensteps-inner-content').length > 0) || ($('.manual-search #screensteps-inner-content').length > 0)
)
{
if ($('#found-lessons').length < 1)
{ $('#screensteps-inner-content').append("<h2>Submit a ticket</h2>") }
}
});
@bluemango
bluemango / sslive_live_text_replace.js
Created October 29, 2010 19:20
Script for replacing strings on ScreenSteps Live
jQuery(document).ready(function($) {
rss_text = "Subscribe";
tags_text = "Tags";
search_button_text = "Search";
sidebar_search_text = "Search";
other_assets_text =" Other Resources";
navigation_header_text = "Navigation";
toc_text = "Manual Table of Contents";
choose_lesson_text = "Choose a lesson";
manual_pdf_text = "Downlaod Manual PDF";
require "google_util"
consumer = OAuth::Consumer.new('anonymous', 'anonymous', {
:site => 'https://www.google.com',
:request_token_path => '/accounts/OAuthGetRequestToken',
:access_token_path => '/accounts/OAuthGetAccessToken',
:authorize_path => '/accounts/OAuthAuthorizeToken'
})
## I have also tried the above with :site => 'https://apps-apis.google.com'
require "google_util"
consumer = OAuth::Consumer.new('anonymous', 'anonymous', {
:site => 'https://www.google.com',
:request_token_path => '/accounts/OAuthGetRequestToken',
:access_token_path => '/accounts/OAuthGetAccessToken',
:authorize_path => '/accounts/OAuthAuthorizeToken'
})
div#screenstepslive-search-results ul li {
list-style: disc;
}