It is currently Sat Dec 02, 2017 4:19 pm Advanced search
function send(msg) {
document.title = "null";
document.title = msg;
}
// image.js
var Gio = imports.gi.Gio;
var Glib = imports.gi.GLib;
// @detail: Get contents of selected folder and enter into list
// @return: file_list List of file names
function get_folder_contents() {
var file_list = [];
// Name of list, change to foler where images are stored
var folder_name = "/usr/share/openclipart/png/computer/";
// Get contents of image folder
file = Gio.file_new_for_path(folder_name);
enumerator = file.enumerate_children("standard::name, standard_size");
// Place each filename into an array
while ((child = enumerator.next_file()))
file_list.push(folder_name + child.get_name());
file_list.sort();
return (file_list);
}
// @detail: Take list of file-names of image files and create a string containing img taglist. Add these to a
// list
// @param file_list List of file names containing log files in /var/log
// @return: div_list List of file names surrounded with div tags
// @bug : Clean up by removing this function and add Jquery command to create img tags in show_images function
function add_html_tags_to_list_elements (file_list) {
var img_list = [];
// Go through each element in list, create a new variable with the file name surronded with img tags and
// add them to new img_list
for (x in file_list) {
var img_contents = '<img src = \"' + file_list[x] + '\" />';
img_list.push(img_contents);
}
return (img_list);
}
// @detail: Get image file_names and add them to image.html. This is required to use the cycle plugin
function show_images(){
var file_list = get_folder_contents()
var img_list = add_html_tags_to_list_elements(file_list);
// Add images to HTML file via JQuery
for (x in img_list) {
// create a JQuery img element
var img = $(img_list[x]);
// Append img element to HTML file in the slideshow div
$(".slideshow").append(img)
}
}
// @details This function is required to run Seed JavaScript code when running SeedKit. This function is run as soon
// as SeedKit loads the HTML file
$(document).ready(function(){
// Call function to add images to HTML files
show_images();
// Run the cycle plugin
$('.slideshow').cycle({
fx: 'scrollRight' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
JAB Creations wrote:A desktop GUI written in web code would be absolutely awesome and I'd personally would love to code one especially since software GUI has absolutely gone in the wrong direction the past few years.
JAB Creations wrote:For clarification I don't have any non-web related programming background, just web stuff including Apache, PHP and MySQL so I'm more interested in using the software to build my own GUI than building the software that would allow me to build a GUI. My goal at the end of the day would be to build my own GUI and actually use it, not simply do it for the sake of doing it. That is where my interest is in this realm of things.
JAB Creations wrote:My goal at the end of the day would be to build my own GUI and actually use it, not simply do it for the sake of doing it. That is where my interest is in this realm of things.
Users browsing this forum: No registered users and 0 guests