gbligh Posted February 1, 2017 Posted February 1, 2017 Hi all, Has anyone got a bit of code that can display a 'New Assignment' button on a dashboard? Thanks!
ADT Posted February 1, 2017 Posted February 1, 2017 What like this.... <style> .app-sites .link-widget.staff-new-assignment { background-color:#c4eab1; } .app-sites .link-widget.staff-new-assignment:hover { background-color:#b4dca0; } </style> <div class="widget-content link-widget widget_applink staff-new-assignment" data-action="launch_quick_assign"> <div class="content-wrapper"> <div class="column link-info"> <h2 class="widget-title alone os-ellipsis">Create New Assignment</h2> <p class="description"></p> </div> </div> <div class="column widget-icon-wrapper"> <div class="widget-icon ui-app-icon ui-app-icon-assignments"></div> </div> </div> <script type="text/javascript"> var $target = jQuery('[data-action=launch_quick_assign]:first'); $target.on('click', function(el, ev) { ev.stopPropagation(); el.frogui_modules_quickassign(); }.bind($target.get(0), $target)); </script> 2
ADT Posted February 2, 2017 Posted February 2, 2017 By the way I cant take the credit for the code.... found it on here one day!! 1
paulmitchell1989 Posted September 1, 2017 Posted September 1, 2017 Since Da Vinci has come along the image has disappeared, any idea what I need to change for it to show an icon again? Looks a bit odd without a picture! <div class="widget-icon ui-app-icon ui-app-icon-assignments"></div>
ADT Posted September 4, 2017 Posted September 4, 2017 On 01/09/2017 at 20:47, paulmitchell1989 said: Since Da Vinci has come along the image has disappeared, any idea what I need to change for it to show an icon again? Looks a bit odd without a picture! <div class="widget-icon ui-app-icon ui-app-icon-assignments"></div> @Graham Quince Pauls got a point... where has the icon gone???
Graham Quince Posted September 5, 2017 Posted September 5, 2017 Do you mean this one? It's probably been removed from the images on the box in the update. The process the devs uses identify changes in code and files - i'm guessing it was automatically filtered.
paulmitchell1989 Posted September 5, 2017 Posted September 5, 2017 27 minutes ago, Graham Quince said: Do you mean this one? It's probably been removed from the images on the box in the update. The process the devs uses identify changes in code and files - i'm guessing it was automatically filtered. Used to look like this... Now my staff dashboard looks like this...
Graham Quince Posted September 5, 2017 Posted September 5, 2017 1 hour ago, paulmitchell1989 said: Used to look like this... Now my staff dashboard looks like this... So...what are you after? The assignment manager icon?
ADT Posted September 5, 2017 Posted September 5, 2017 (edited) @Graham QuinceNope the assignments icon!! Edited September 5, 2017 by ADT
ADT Posted September 12, 2017 Posted September 12, 2017 (edited) @Graham Quince what about just using the Assignments Icon... what needs to be added/changed to do that?? The one with no tick or magnifying glass!! Edited September 12, 2017 by ADT
Graham Quince Posted September 12, 2017 Posted September 12, 2017 Well that's easy, just right-click on the link, choose Inspect and the class name is in the code: ui-app-icon-markbook
ADT Posted September 12, 2017 Posted September 12, 2017 So it becomes.... <style> .app-sites .link-widget.staff-new-assignment { background-color:#c4eab1; } .app-sites .link-widget.staff-new-assignment:hover { background-color:#b4dca0; } </style> <div class="widget-content link-widget widget_applink staff-new-assignment" data-action="launch_quick_assign"> <div class="content-wrapper"> <div class="column link-info"> <h2 class="widget-title alone os-ellipsis">Create New Assignment</h2> <p class="description"></p> </div> </div> <div class="column widget-icon-wrapper"> <div class="widget-icon ui-app-icon ui-app-icon-markbook"></div> </div> </div> <script type="text/javascript"> var $target = jQuery('[data-action=launch_quick_assign]:first'); $target.on('click', function(el, ev) { ev.stopPropagation(); el.frogui_modules_quickassign(); }.bind($target.get(0), $target)); </script> @Graham Quince
ADT Posted September 12, 2017 Posted September 12, 2017 6 hours ago, ADT said: So it becomes.... <style> .app-sites .link-widget.staff-new-assignment { background-color:#c4eab1; } .app-sites .link-widget.staff-new-assignment:hover { background-color:#b4dca0; } </style> <div class="widget-content link-widget widget_applink staff-new-assignment" data-action="launch_quick_assign"> <div class="content-wrapper"> <div class="column link-info"> <h2 class="widget-title alone os-ellipsis">Create New Assignment</h2> <p class="description"></p> </div> </div> <div class="column widget-icon-wrapper"> <div class="widget-icon ui-app-icon ui-app-icon-markbook"></div> </div> </div> <script type="text/javascript"> var $target = jQuery('[data-action=launch_quick_assign]:first'); $target.on('click', function(el, ev) { ev.stopPropagation(); el.frogui_modules_quickassign(); }.bind($target.get(0), $target)); </script> @Graham Quince Because that doesn't work? 1
Graham Quince Posted September 13, 2017 Posted September 13, 2017 How odd. Looks like the new icons are being served in a different way. You'll have to upload this somewhere then alter the code to point to it, probably: <style> .app-sites .link-widget.staff-new-assignment { background-color:#c4eab1; } .app-sites .link-widget.staff-new-assignment:hover { background-color:#b4dca0; } </style> <div class="widget-content link-widget widget_applink staff-new-assignment" data-action="launch_quick_assign"> <div class="content-wrapper"> <div class="column link-info"> <h2 class="widget-title alone os-ellipsis">Create New Assignment</h2> <p class="description"></p> </div> </div> <div class="column widget-icon-wrapper"> <div style="width:52px; height:52px; background:url('file/asset/E3247B3B20030513F1D16F11C26BD504D4414AAC8A440A22.png')" ></div> </div> </div> <script type="text/javascript"> var $target = jQuery('[data-action=launch_quick_assign]:first'); $target.on('click', function(el, ev) { ev.stopPropagation(); el.frogui_modules_quickassign(); }.bind($target.get(0), $target)); </script> Edited to add: How about someone build this into a widget?
paulmitchell1989 Posted September 13, 2017 Posted September 13, 2017 24 minutes ago, Graham Quince said: How odd. Looks like the new icons are being served in a different way. You'll have to upload this somewhere then alter the code to point to it, probably: <style> .app-sites .link-widget.staff-new-assignment { background-color:#c4eab1; } .app-sites .link-widget.staff-new-assignment:hover { background-color:#b4dca0; } </style> <div class="widget-content link-widget widget_applink staff-new-assignment" data-action="launch_quick_assign"> <div class="content-wrapper"> <div class="column link-info"> <h2 class="widget-title alone os-ellipsis">Create New Assignment</h2> <p class="description"></p> </div> </div> <div class="column widget-icon-wrapper"> <div style="background:url('file/asset/E3247B3B20030513F1D16F11C26BD504D4414AAC8A440A22.png')" ></div> </div> </div> <script type="text/javascript"> var $target = jQuery('[data-action=launch_quick_assign]:first'); $target.on('click', function(el, ev) { ev.stopPropagation(); el.frogui_modules_quickassign(); }.bind($target.get(0), $target)); </script> Still can't get it to work uploaded the file underneath the button on a test page, changed the asset url and still doesn't appear
Graham Quince Posted September 13, 2017 Posted September 13, 2017 1 minute ago, paulmitchell1989 said: Still can't get it to work uploaded the file underneath the button on a test page, changed the asset url and still doesn't appear check out my edited code 1
ADT Posted September 13, 2017 Posted September 13, 2017 34 minutes ago, Graham Quince said: check out my edited code Sorted!!
ADT Posted September 13, 2017 Posted September 13, 2017 (edited) 36 minutes ago, Graham Quince said: check out my edited code Ish.... this is the old graphic.... where's the new one??? Edited September 13, 2017 by ADT
paulmitchell1989 Posted September 13, 2017 Posted September 13, 2017 56 minutes ago, Graham Quince said: check out my edited code Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now