From b808f73effc848c49451a61b93bd453ea81bfb19 Mon Sep 17 00:00:00 2001 From: Ricardo Tomasi Date: Sun, 19 May 2013 18:52:12 -0300 Subject: [PATCH] First steps towards saving settings --- core/admin/assets/js/settings.js | 17 +++++++++++++++++ core/admin/views/settings.hbs | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/core/admin/assets/js/settings.js b/core/admin/assets/js/settings.js index d28d068ed0..98fec36207 100644 --- a/core/admin/assets/js/settings.js +++ b/core/admin/assets/js/settings.js @@ -30,6 +30,23 @@ $('input').iCheck({ checkboxClass: 'icheckbox_square-grey' }); + + $('.button-save').click(function(e){ + e.preventDefault(); + console.log(getSettings()); + }) }); + var defaultSettings = { + title: 'My Blog', + description: '' + }; + + function getSettings () { + return $.extend(defaultSettings, { + title : $('#blog-title').val(), + description : $('#blog-description').val() + }); + } + }(jQuery)); \ No newline at end of file diff --git a/core/admin/views/settings.hbs b/core/admin/views/settings.hbs index b8ad64409f..3124d827d5 100644 --- a/core/admin/views/settings.hbs +++ b/core/admin/views/settings.hbs @@ -128,13 +128,13 @@